1(function( $ ){ 2 'use strict'; 3 4 // Document ready 5 $(document).ready( function() { 6 // Load more button 7 $('.ova-load-more-por').on( 'click', function() { 8 var paged = $(this).closest('.ova_more_por').attr('data-paged'); 9 var perpage = $(this).closest('.ova_more_por').attr('data-perpage'); 10 var cat = $(this).closest('.ova_more_por').attr('data-cat'); 11 var type = $(this).closest('.ova_more_por').attr('data-type'); 12 13 var new_paged = parseInt(paged) + 1; 14 $(this).closest('.ova_more_por').attr('data-paged',new_paged); 15 16 $('.ova-load-more-por').css({'display':'none'}); 17 $('.ova-loader').css({'display':'inline-block'}); 18 19 jQuery.ajax({ 20 url: ajax_object.ajax_url, 21 type: 'POST', 22 data: ({ 23 action: 'ova_loadmore_portfolio', 24 paged: paged, 25 perpage: perpage, 26 cat: cat, 27 type: type, 28 }), 29 success: function(data) { 30 if ( data ){ 31 $('.content-por').append(data).isotope('appended', data); 32 33 $('.content-por').imagesLoaded( function() { 34 $('.content-por').isotope( 'reloadItems' ).isotope(); 35 }); 36 37 $('.ova-load-more-por').css({'display':'inline-block'}); 38 $('.ova-loader').css({'display':'none'}); 39 } else { 40 $('.ova-loader').css({'display':'none'}); 41 $('.ova-nodata').css({'display':'block'}); 42 $('.ova-nodata span').css({'display':'inline-block'}); 43 } 44 } 45 }); 46 }); // End load more button 47 48 // Images loaded 49 $(".content-por").each(function(){ 50 var $mcontainer = $(this); 51 $mcontainer.imagesLoaded( function() { 52 $mcontainer.isotope({ 53 itemSelector : '.ovapor-item', 54 animationOptions: { 55 duration: 750, 56 easing: 'linear' 57 }, 58 }); 59 60 if ( $mcontainer.hasClass('classic-portfolio') ) { 61 $mcontainer.isotope({ 62 layoutMode: 'fitRows', 63 fitRows: { 64 gutter: 30 65 }, 66 }) 67 } 68 }); 69 }); // End Images loaded 70 71 // Archive portfolio 72 $('.archive-por .list-cat-por li').click( function() { 73 // Remove active class 74 $(".archive-por .list-cat-por li").removeClass("active"); 75 76 // Add active class 77 $(this).addClass("active"); 78 79 // Date filter 80 var selector = $(this).attr('data-filter'); 81 82 // isotope 83 $(".content-por").isotope({ 84 filter: selector, 85 animationOptions: { 86 duration: 750, 87 easing: 'linear', 88 queue: false, 89 } 90 }); 91 92 // isotope - template: classic 93 if ( $(this).hasClass('classic-portfolio') ) { 94 $(".content-por").isotope({ 95 layoutMode: 'fitRows', 96 fitRows: { 97 gutter: 30 98 } 99 }); 100 } 101 102 return false; 103 }); // End Archive portfolio 104 105 // Gallery fancybox 106 $('.single-por .item-gallery .por-gallery-fancybox').on( 'click', function(e) { 107 e.preventDefault(); 108 109 var index = $(this).data('index'); 110 var galleryData = $(this).closest('.single-por').find('.ova-data-gallery').data('gallery'); 111 112 Fancybox.show( galleryData, { 113 Image: { 114 Panzoom: { 115 zoomFriction: 0.7, 116 maxScale: function () { 117 return 3; 118 }, 119 }, 120 }, 121 startIndex: index, 122 }); 123 }); // End Gallery fancybox 124 }); // End Document ready 125 126})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.