1jQuery(document).ready(function ($) { 2 3 /*$(".wp-pagenavi .nextpostslink").text(function () { 4 5 console.log(this); 6 7 //return $(this).text().replace("»", ""); 8 });âââââ 9 */ 10 11 // $('.sk-tweet-text').replace('"..."', ''); 12 13 // -------- CUSTOM ACCORDION BASED ON JQUERY ------------------------------------------------------------------------ 14 // Doc: https://jquery.com/ 15 16 $('.accordion > .list-item:eq(0) .list-title').addClass('active').next().slideDown(); 17 18 $('.accordion .list-title').click(function (j) { 19 var dropDown = $(this).closest('.list-item').find('.list-excerpt'); 20 21 $(this).closest('.accordion').find('.list-excerpt').not(dropDown).slideUp(); 22 23 if ($(this).hasClass('active')) { 24 $(this).removeClass('active'); 25 } else { 26 $(this).closest('.accordion').find('a.active').removeClass('active'); 27 $(this).addClass('active'); 28 } 29 30 dropDown.stop(false, true).slideToggle(); 31 32 j.preventDefault(); 33 }); 34 35 // -------- CUSTOM TABS BASED ON JQUERY ------------------------------------------------------------------------ 36 // Doc: https://jquery.com/ 37 38 var tab_selector = '.mc-tabs'; 39 40 $(tab_selector + ' .tab-link').click(function () { 41 42 var tab_id = $(this).attr('data-tab'); 43 44 var $parent = $("#" + tab_id).parent(); 45 46 $parent.find(".tab-link").removeClass('current'); 47 48 $parent.find(".mc-tabs-content").removeClass('current'); 49 50 $(this).addClass('current'); 51 52 $("#" + tab_id).addClass('current'); 53 54 }); 55 56 // -------- STAGGER LIST BASED ON JQUERY ------------------------------------------------------------------------ 57 // Doc: https://jquery.com/ 58 59 var list = $('.stagger-list'); 60 var items = list.find('.list-item'); 61 62 for (var i = 0; i < items.length; i++) { 63 var item = items.eq(i); 64 var delay = (i + 1) / 10; 65 66 item.css({ 67 'transition-delay': delay + "s", 68 'transition-duration': '.75s', 69 'transition-timing-function': 'cubic-bezier(0.075, 0.82, 0.165, 1)' 70 }).addClass('display'); 71 } 72 ; 73 74 // -------- SIMPLE LOAD MORE / LOAD MORE ------------------------------------------------------------------------ 75 // Doc: https://github.com/zeshanshani/simple-load-more/ 76 /* 77 $('.stories-list').simpleLoadMore({ 78 item: '.list-item', 79 count: 3, 80 btnHTML: '<div class="load-more-wrapper"><a href="#" class="load-more mc-button yellow">Load more stories</a></div>' 81 });*/ 82 83 // -------- Infinte Scroll ------------------------------------------------------------------------ 84 // Doc: https://infinite-scroll.com/ 85 /* 86 $('.infinite-scroll').infiniteScroll({ 87 path: '.next', 88 append: '.list-item', 89 history: false, 90 hideNav: '.pagination-wrapper', 91 status: '.scroller-status' 92 });*/ 93 94 // -------- SLICK SLIDER / CUSTOM SLIDER WITH VIDEOS ------------------------------------------------------------------------ 95 // Doc: http://kenwheeler.github.io/slick/ 96 97 /* Display Slide Title in Slick Dots*/ 98 /* 99 $('.home-slider .slider').on('init', function(event, slick){ 100 var dots = $( '.slick-dots li' ); 101 dots.each( function( k, v){ 102 $(this).find( 'button' ).addClass( 'heading'+ k ); 103 }); 104 var items = slick.$slides; 105 items.each( function( k, v){ 106 var text = $(this).find( '.slide-title' ).text(); 107 $( '.heading' + k ).text(text); 108 }); 109 }); 110 */ 111 112 /* Init Slick Slider with Videos */ 113 /* 114 var slideWrapper = $('.home-slider .slider'); 115 116 if ( slideWrapper.length ){ 117 118 function playPauseVideo(slick, control){ 119 var currentSlide = slick.find(".slick-current .slide"); 120 var slideType = currentSlide.attr("class").split(" ")[1]; 121 var muted = currentSlide.attr("class").split(" ").indexOf( 'muted' ) > 0; 122 123 // If slide is not video, stop 124 if( typeof slideType === 'undefined' ) return; 125 126 if (slideType === "external-video") { 127 var frame = currentSlide.find("iframe"); 128 var frameSrc = frame.attr( 'basisSrc' ); 129 var player = frame.get(0); 130 131 if( frameSrc.indexOf( 'vimeo' ) > 1 ) { 132 133 frameSrc += ( 134 control === 'play' 135 ? 136 '?autoplay=1&autopause=0&loop=1&controls=0&dnt=1&muted=1' 137 : 138 '?autoplay=0&autopause=1' 139 ); 140 141 } else if( frameSrc.indexOf( 'youtube' ) > 1 ) { 142 143 frameSrc += ( 144 control === 'play' 145 ? 146 '&autoplay=1&controls=0&cc_load_policy=0&modestbranding=1&mute=1&cc_load_policy=0' 147 : 148 '?autoplay=0' 149 ); 150 151 } 152 153 frame.attr( 'src', frameSrc ); 154 155 } else if (slideType === "local-video") { 156 var video = currentSlide.find("video").get(0); 157 158 if (video !== null) { 159 if (control === "play"){ 160 video.play(); 161 } else { 162 video.pause(); 163 } 164 } 165 } 166 } 167 168 slideWrapper.on( 'init', function(event,slick){ 169 setTimeout(function(){ 170 slick = $(slick.$slider); 171 playPauseVideo(slick,"play"); 172 }, 1000); 173 }).on( 'beforeChange', function(event, slick) { 174 slick = $(slick.$slider); 175 playPauseVideo(slick,"pause"); 176 }).on( 'afterChange', function(event, slick) { 177 slick = $(slick.$slider); 178 playPauseVideo(slick,"play"); 179 }); 180 181 slideWrapper.slick({ 182 autoplay: false, 183 autoplaySpeed:6000, 184 speed:600,
185 cssEase:"cubic-bezier(0.87, 0.03, 0.41, 0.9)", 186 }); 187 } 188 */ 189 190 // -------- SLICK SLIDER / SLIDER ------------------------------------------------------------------------ 191 // Doc: http://kenwheeler.github.io/slick/ 192 193 194 195 196 197 /*$('.grid-twitter-feed').slick({ 198 dots: true, 199 speed: 600, 200 autoplay: false, 201 autoplaySpeed: 6000, 202 arrows: true, 203 });*/ 204 205 206 $(function () { 207 $('.topic-list').on('init', function (event, slick) { 208 //$(this).append('<span class="top-heading">Our Priorities</span>'); 209 $(this).find('.list-tag').append('<div class="slick-counter"><span class="current"></span> / <span class="total"></span></div>'); 210 $('.current').text(slick.currentSlide + 1); 211 $('.total').text(slick.slideCount); 212 }) 213 .slick({ 214 dots: false, 215 speed: 2000, 216 autoplay: false, 217 autoplaySpeed: 4000, 218 arrows: true, 219 responsive: [ 220 { 221 breakpoint: 1027, 222 settings: { 223 slidesToShow: 1, 224 slidesToScroll: 1, 225 infinite: true, 226 arrows: false, 227 dots: true 228 } 229 }, 230 { 231 breakpoint: 981, 232 233 settings: "unslick", 234 235 }, 236 ] 237 }) 238 .on('beforeChange', function (event, slick, currentSlide, nextSlide) { 239 $('.current').text(nextSlide + 1); 240 }); 241 }); 242 243 244 // -------- SLICK SLIDER / Carousel ------------------------------------------------------------------------ 245 // Doc: http://kenwheeler.github.io/slick/ 246 247 $('.carousel').slick({ 248 dots: true, 249 infinite: false, 250 speed: 300, 251 slidesToShow: 4, 252 slidesToScroll: 4, 253 responsive: [ 254 { 255 breakpoint: 1027, 256 settings: { 257 slidesToShow: 3, 258 slidesToScroll: 3, 259 infinite: true, 260 dots: true 261 } 262 }, 263 { 264 breakpoint: 981, 265 settings: { 266 slidesToShow: 2, 267 slidesToScroll: 2, 268 infinite: true, 269 dots: true 270 } 271 }, 272 { 273 breakpoint: 480, 274 settings: { 275 slidesToShow: 1, 276 slidesToScroll: 1 277 } 278 } 279 ] 280 }); 281 282 // -------- JUSTIFIED GALLERY ------------------------------------------------------------------------ 283 // Doc: http://miromannino.github.io/Justified-Gallery/options-and-events/ 284 /* 285 $(".photo-gallery").justifiedGallery({ 286 rowHeight: 150, 287 margins: 10, 288 border: 0, 289 }); 290 */ 291 292 293 // -------- MAGINFICIENT POPUP / This is the native lightobx script of DIVI 294 // Doc: http://dimsemenov.com/plugins/magnific-popup/ 295 296 297 function initSearchFilterPopups(elems) { 298 if (elems.length !== 0) { 299 elems.magnificPopup({ 300 disableOn: 0, 301 type: 'inline', 302 mainClass: 'mfp-fade', 303 removalDelay: 160, 304 preloader: false, 305 fixedContentPos: true 306 }); 307 } 308 } 309 310 initSearchFilterPopups($('.mg-inline')); 311 312 if ($('.mg-video').length) { 313 $('.mg-video').magnificPopup({ 314 disableOn: 0, 315 type: 'iframe', 316 mainClass: 'mfp-fade', 317 removalDelay: 160, 318 preloader: false, 319 fixedContentPos: false 320 }); 321 } 322 323 if ($('.photo-gallery').length) { 324 $('.photo-gallery').magnificPopup({ 325 delegate: 'a', 326 type: 'image', 327 tLoading: 'Loading image #%curr%...', 328 mainClass: 'mfp-fade', 329 gallery: { 330 enabled: true, 331 navigateByImgClick: true, 332 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 333 }, 334 image: { 335 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 336 titleSrc: function (item) { 337 //return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; 338 return item.el.attr('title'); 339 } 340 } 341 }); 342 } 343 344 // -------- FULL CALENDAR ------------------------------------------------------------------------ 345 // Doc: https://fullcalendar.io/ 346 // Note: To get the JSON feed generated, activate this line : add_action('wp_head', 'get_events_json_feed'); located in lib/wp.php at line #83 347 /* 348 eventsFeedUrl = '/wpdivi/events-feed.json'; 349 var json_source = eventsFeedUrl; 350 var events = (function () { 351 352 var json = null; 353 $.ajax({ 354 'async': false, 355 'global': false, 356 'url': json_source, 357 'dataType': "json", 358 'success': function (data) { 359 json = data; 360 } 361 }); 362 363 return json; 364 365 })(); 366 367 var cal0 = $('#calendar0'); 368 var currentDate = moment().format('YYYY-MM-DD'); 369 var futureMonth = moment().add(1, 'month').format('YYYY-MM-DD'); 370 371 cal0.fullCalendar({ 372 nextDayThreshold: '00:00:00', 373 header: { 374 left: 'title', 375 center: '', 376 right: 'prev,next today', 377 }, 378 displayEventTime: false, 379 defaultDate: currentDate, 380 events: events, 381 }); 382 383 $(window).on('load', function(){ 384 $('body').removeClass('no-js'); 385 }); 386 */ 387 388}); 389 390 391/// -------- MixItUp JS ------------------------------------------------------------------------ 392 393var containerEl = document.querySelector('.mc-filtered-list'); 394 395if (containerEl) { 396 397 var mixer = mixitup(containerEl, { 398 multifilter: { 399 enable: true 400 }, 401 selectors: { 402 target: '.list-item' 403 }, 404 animation: { 405 //effects: 'fade scale stagger(50ms)' // Set a 'stagger' effect for the loading animation 406 }, 407 pagination: { 408 //limit: 4 409 }, 410 load: { 411 filter: 'none' // Ensure all targets start from hidden (i.e. display: none;) 412 }, 413 callbacks: { 414 onMixEnd: function (state) { 415 if ($('#noItemsFoundMessage').length > 0) { 416 if (state.hasFailed) { 417 noItemsFoundMessage.style.display = "block"; 418 //alert("No items found"); 419 } else { 420 noItemsFoundMessage.style.display = "none"; 421 //alert("Items found"); 422 } 423 } 424 425 } 426 } 427 }); 428 // Add a class to the container to remove 'visibility: hidden;' from targets. This 429 // prevents any flickr of content before the page's JavaScript has loaded. 430 containerEl.classList.add('mixitup-ready'); 431 // Show all targets in the container 432 mixer.show() 433 .then(function () { 434 // Remove the stagger effect for any subsequent operations 435 mixer.configure({ 436 animation: { 437 effects: 'fade scale' 438 } 439 }); 440 }); 441} 442 443 444 445window.addEventListener('error', function(event) { 446 if (event.message.includes("mediaelementplayer is not a function")) { 447 console.warn('Caught mediaelementplayer error, ignoring:', event.message); 448 event.preventDefault(); // ÐгноÑиÑÑем оÑÐ¸Ð±ÐºÑ 449 } 450});
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.