Letlabo Nature Reserve
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

setting.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. jQuery(document).ready(function($){
  2. if (jQuery().quicksand) {
  3. // Clone applications to get a second collection
  4. var $data = $(".portfolio").clone();
  5. //NOTE: Only filter on the main portfolio page, not on the subcategory pages
  6. $('.filter li').click(function(e) {
  7. $(".filter li").removeClass("active");
  8. // Use the last category class as the category to filter by. This means that multiple categories are not supported (yet)
  9. var filterClass=$(this).attr('class').split(' ').slice(-1)[0];
  10. if (filterClass == 'all') {
  11. var $filteredData = $data.find('.item-thumbs');
  12. } else {
  13. var $filteredData = $data.find('.item-thumbs[data-type=' + filterClass + ']');
  14. }
  15. $(".portfolio").quicksand($filteredData, {
  16. duration: 600,
  17. adjustHeight: 'auto'
  18. }, function () {
  19. // Portfolio fancybox
  20. $(".fancybox").fancybox({
  21. padding : 0,
  22. beforeShow: function () {
  23. this.title = $(this.element).attr('title');
  24. this.title = '<h4>' + this.title + '</h4>' + '<p>' + $(this.element).parent().find('img').attr('alt') + '</p>';
  25. },
  26. helpers : {
  27. title : { type: 'inside' },
  28. }
  29. });
  30. });
  31. $(this).addClass("active");
  32. return false;
  33. });
  34. }//if quicksand
  35. });