Advertisement
Guest User

Untitled

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