I don't understand why the images vanish when I click on a filter.
The Quicksand script code (located in the file called jquery.custom.js
):
jQuery.noConflict();
jQuery(document).ready(function($){
// Clone applications to get a second collection
var $data = $("#portfolio-items").clone();
//NOTE: Only filter on the main portfolio page, not on the subcategory pages
$('#portfolio-terms ul li').click(function(e) {
$("ul li").removeClass("active");
// Use the last category class as the category to filter by. This means that multiple categories are not supported (yet)
var filterClass=$(this).attr('class') //.split(' ').slice(-1)[0];
filterClass = filterClass ? filterClass.split(' ').slice(-1)[0] : '';
if (filterClass == '.all current') {
var $filteredData = $data.find('#portfolio-');
} else {
var $filteredData = $data.find('#portfolio-[data-type=' + filterClass + ']');
}
$("#portfolio-items").quicksand($filteredData, {
duration: 800,
easing: 'swing',
});
$(this).addClass("active");
return false;
});
});
Here you can see the PHP code of portfolio-items and terms: http://snipt.org/Mnp8
Can you help me please?
Thank you!