View difference between Paste ID: duwpmKGb and a5Rw6L8Z
SHOW: | | - or go back to the newest paste.
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-
	    $(this).addClass('active');
11+
12
	    $tag.addClass('active');
13
        }).fail(function(jqXHR, textStatus) {
14
            alert( "Request failed: " + textStatus );
15
        });
16
    });
17
});