Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2013
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     $('.productTag').click(function() {
  3.         $('.productTag').each(function() {
  4.             $(this).removeClass('active');
  5.         });
  6.  
  7.         $.ajax({
  8.             url: 'assortiment/filter?title=' + $(this).text()
  9.         }).done(function(data) {
  10.             $('#productList').html(data);
  11.         $(this).addClass('active');
  12.         }).fail(function(jqXHR, textStatus) {
  13.             alert( "Request failed: " + textStatus );
  14.         });
  15.     });
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement