mirror of
https://github.com/dawidolko/Website-Templates.git
synced 2026-02-04 17:40:04 +00:00
Website templates
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
jQuery.noConflict();
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
if (jQuery().quicksand) {
|
||||
|
||||
// Clone applications to get a second collection
|
||||
var $data = $(".portfolio-area").clone();
|
||||
|
||||
//NOTE: Only filter on the main portfolio page, not on the subcategory pages
|
||||
$('.portfolio-categ li').click(function(e) {
|
||||
$(".filter 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];
|
||||
|
||||
if (filterClass == 'all') {
|
||||
var $filteredData = $data.find('.item-thumbs');
|
||||
} else {
|
||||
var $filteredData = $data.find('.item-thumbs[data-type=' + filterClass + ']');
|
||||
}
|
||||
$(".portfolio-area").quicksand($filteredData, {
|
||||
duration: 600,
|
||||
adjustHeight: 'auto'
|
||||
}
|
||||
$(this).addClass("active");
|
||||
return false;
|
||||
});
|
||||
|
||||
}//if quicksand
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user