1/* 2 * Classic Addons for Elementor Scripts 3 * Description: Classic addons plugin have 20+ massive widgets for Elementor page builder. 4 * Version: 1.0 5 * Author: zozothemes 6 */ 7 8(function( $ ) { 9 10 "use strict"; 11 12 $( document ).ready(function() { 13 14 /* Shortcode CSS Append */ 15 var css_out = ''; 16 $( ".cea-inline-css" ).each(function() { 17 var shortcode = $( this ); 18 var shortcode_css = shortcode.attr("data-css"); 19 css_out += ($).parseJSON( shortcode_css ); 20 shortcode.removeAttr("data-css"); 21 }); 22 if( css_out != '' ){ 23 $('head').append( '<style id="cea-shortcode-styles">'+ css_out +'</style>' ); 24 } 25 26 if( $('#cea-panorama').length ){ 27 console.log("test"); 28 var img_src = $('#cea-panorama').attr("data-src"); 29 pannellum.viewer('cea-panorama', { 30 "type": "equirectangular", 31 "panorama": img_src 32 }); 33 $(".pnlm-load-button").trigger("click"); 34 } 35 36 }); // document ready end 37 38 //Window Load 39 $(window).on('load', function() { 40 41 /* Theme Owl Carousel Code */ 42 $( ['.cea-related-slider'] ).each(function( index, value ) { 43 //console.log( 'dsfhdskjh ' + $('.cea-related-slide').attr("class") ); 44 if( $(value).length ){ 45 cea_owl_carousel( $( value ) ); 46 } 47 }); 48 49 /* Isotope Trigger */ 50 $( ".cea-archive-template > .isotope" ).each(function( index, value ) { 51 ceaArchiveIsotopeLayout(this); 52 }); 53 54 }); // window load end 55 56 function ceaArchiveIsotopeLayout( c_elem ){ 57 var c_elem = $(c_elem); 58 var parent_width = c_elem.width(); 59 var gutter_size = c_elem.data( "gutter" ); 60 var grid_cols = c_elem.data( "cols" ); 61 var filter = ''; 62 63 var layoutmode = c_elem.is('[data-layout]') ? c_elem.data( "layout" ) : ''; 64 var lazyload = c_elem.is('[data-lazyload]') ? c_elem.data( "lazyload" ) : ''; 65 layoutmode = layoutmode ? layoutmode : 'masonry'; 66 lazyload = lazyload ? '0s' : '0.4s'; 67 68 if( $(window).width() < 768 ) grid_cols = 1; 69 70 var net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols ); 71 c_elem.find( ".isotope-item" ).css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'}); 72 73 var cur_isotope; 74 75 /* Call ssotope after image loaded */ 76 c_elem.imagesLoaded( function(){ 77 cur_isotope = c_elem.isotope({ 78 itemSelector: '.isotope-item', 79 layoutMode: layoutmode, 80 filter: filter, 81 transitionDuration: lazyload, 82 masonry: { 83 gutter: gutter_size 84 }, 85 fitRows: { 86 gutter: gutter_size 87 } 88 }); 89 }); 90 91 /* Isotope filter item */ 92 $(c_elem).prev(".isotope-filter").find( ".isotope-filter-item" ).on( 'click', function() { 93 $( this ).parents("ul.nav").find("li").removeClass("active"); 94 $( this ).parent("li").addClass("active"); 95 filter = $( this ).attr( "data-filter" ); 96 if( c_elem.find( ".isotope-item" + filter ).hasClass( "cea-animate" ) ){ 97 if( filter ){ 98 c_elem.find( ".isotope-item" + filter ).removeClass("run-animate"); 99 }else{ 100 c_elem.find( ".isotope-item" ).removeClass("run-animate"); 101 } 102 cea_scroll_animation(c_elem); 103 } 104 cur_isotope.isotope({ 105 filter: filter 106 }); 107 108 return false; 109 }); 110 111 //Animate isotope items 112 if( c_elem.find( ".isotope-item" ).hasClass( "cea-animate" ) ){ 113 cea_scroll_animation(c_elem); 114 $(window).on('scroll', function(){ 115 cea_scroll_animation(c_elem); 116 }); 117 }else{ 118 c_elem.children(".isotope-item").addClass("item-visible"); 119 } 120 121 /* Isotope infinite */ 122 if( c_elem.data( "infinite" ) == 1 && $("ul.post-pagination").length ){ 123 124 var loadmsg = c_elem.data( "loadmsg" ); 125 var loadend = c_elem.data( "loadend" ); 126 var loadimg = c_elem.data( "loadimg" ); 127 128 c_elem.infinitescroll({ 129 navSelector : '.post-pagination',//'#page_nav', // selector for the paged navigation 130 nextSelector : 'a.next-page',//'#page_nav a', // selector for the NEXT link (to page 2) 131 itemSelector : '.isotope-item', // selector for all items you'll retrieve 132 loading: { 133 msgText : loadmsg, 134 finishedMsg: loadend, 135 img: loadimg //'https://cdn.dribbble.com/users/968568/screenshots/3339151/loader.gif' 136 } 137 }, 138 // call Isotope as a callback 139 function( newElements ) { 140 var elems = $(newElements); 141 var net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols ); 142 c_elem.find( ".isotope-item" ).css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'}); 143 elems.imagesLoaded( function(){ 144 c_elem.isotope( 'appended', elems ); 145 }); 146 147 //Animate isotope items 148 if( c_elem.find( ".isotope-item" ).hasClass( "cea-animate" ) ){ 149 cea_scroll_animation(c_elem); 150 }else{ 151 c_elem.children(".isotope-item").addClass("item-visible"); 152 } 153 }); 154 } 155 156 /* Isotope resize */ 157 $( window ).resize(function() { 158 setTimeout(function(){ 159 grid_cols = c_elem.data( "cols" ); 160 if( $(window).width() < 768 ) grid_cols = 1; 161 162 var parent_width = c_elem.width(); 163 net_width = Math.floor( ( parent_width - ( gutter_size * ( grid_cols - 1 ) ) ) / grid_cols ); 164 c_elem.find( ".isotope-item" ).css({'width':net_width+'px'}); 165 c_elem.imagesLoaded( function(){ 166 var $isot = c_elem.isotope({ 167 itemSelector: '.isotope-item', 168 masonry: { 169 gutter: gutter_size 170 } 171 });
172 }); 173 174 }, 200); 175 }); 176 177 } 178 179 function cea_owl_carousel( c_owlCarousel ){ 180 // Data Properties 181 var loop = c_owlCarousel.data( "loop" ); 182 var margin = c_owlCarousel.data( "margin" ); 183 var center = c_owlCarousel.data( "center" ); 184 var nav = c_owlCarousel.data( "nav" ); 185 var dots_ = c_owlCarousel.data( "dots" ); 186 var items = c_owlCarousel.data( "items" ); 187 var items_tab = c_owlCarousel.data( "items-tab" ); 188 var items_mob = c_owlCarousel.data( "items-mob" ); 189 var duration = c_owlCarousel.data( "duration" ); 190 var smartspeed = c_owlCarousel.data( "smartspeed" ); 191 var scrollby = c_owlCarousel.data( "scrollby" ); 192 var autoheight = c_owlCarousel.data( "autoheight" ); 193 var autoplay = c_owlCarousel.data( "autoplay" ); 194 var rtl = $( "body.rtl" ).length ? true : false; 195 196 $( c_owlCarousel ).owlCarousel({ 197 rtl : rtl, 198 loop : loop, 199 autoplayTimeout : duration, 200 smartSpeed : smartspeed, 201 center: center, 202 margin : margin, 203 nav : nav, 204 dots : dots_, 205 autoplay : autoplay, 206 autoheight : autoheight, 207 slideBy : scrollby, 208 responsive:{ 209 0:{ 210 items: items_mob 211 }, 212 544:{ 213 items: items_tab 214 }, 215 992:{ 216 items: items 217 } 218 } 219 }); 220 } 221 222})( jQuery ); 223
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.