1(function ($) { 2 "use strict"; 3 // Menu Init 4 $('#brg-nav-menu').smartmenus(); 5 6 // Animation Init 7 AOS.init({ 8 duration: 1200, 9 }); 10 11 $('.brg-menu-icon, .brg-menu-close').on('click', function() { 12 $('.brg-header-content').toggleClass('on'); 13 $(".body-overlay").toggleClass("opened"); 14 }); 15 16 $(".body-overlay").on("click", function() { 17 $(".brg-header-content").removeClass("on"); 18 $(".body-overlay").removeClass("opened"); 19 }); 20 21 /* Single Music lists bottom */ 22 $(".brg-swiper-music-items-wrapper").each(function(index, element) { 23 var $this = $(this); 24 $this.find(".brg-swiper-music-items").addClass("brg-swiper-music-items-" + index); 25 $this.find(".swiper-button-prev").addClass("btn-prev-" + index); 26 $this.find(".swiper-button-next").addClass("btn-next-" + index); 27 var swiperSingleMusic = new Swiper(".brg-swiper-music-items-" + index, { 28 navigation: { 29 nextEl: ".btn-next-" + index, 30 prevEl: ".btn-prev-" + index 31 }, 32 breakpoints: { 33 320: { 34 spaceBetween: 10, 35 CSSWidthAndHeight: true, 36 slidesPerView: 'auto', 37 }, 38 768: { 39 slidesPerView: 2, 40 spaceBetween: 20 41 }, 42 991: { 43 slidesPerView: 2, 44 spaceBetween: 20 45 }, 46 992: { 47 slidesPerView: 2, 48 spaceBetween: 30, 49 } 50 } 51 }); 52 }); 53 54 /* Single Podcast lists bottom */ 55 $(".brg-swiper-podcast-items-wrapper").each(function(index, element) { 56 var $this = $(this); 57 $this.find(".brg-swiper-podcast-items").addClass("brg-swiper-podcast-items-" + index); 58 $this.find(".swiper-button-prev").addClass("btn-prev-" + index); 59 $this.find(".swiper-button-next").addClass("btn-next-" + index); 60 var swiperSinglePodcast = new Swiper(".brg-swiper-podcast-items-" + index, { 61 navigation: { 62 nextEl: ".btn-next-" + index, 63 prevEl: ".btn-prev-" + index 64 }, 65 breakpoints: { 66 320: { 67 spaceBetween: 10, 68 CSSWidthAndHeight: true, 69 slidesPerView: 'auto', 70 }, 71 768: { 72 slidesPerView: 2, 73 spaceBetween: 20 74 }, 75 991: { 76 slidesPerView: 2, 77 spaceBetween: 20 78 }, 79 992: { 80 slidesPerView: 2, 81 spaceBetween: 25, 82 } 83 } 84 }); 85 }); 86 87 /* Single News lists bottom */ 88 $(".brg-swiper-news-items-wrapper").each(function(index, element) { 89 var $this = $(this); 90 $this.find(".brg-swiper-news-items").addClass("brg-swiper-news-items-" + index); 91 $this.find(".brg-hero-img").addClass("brg-hero-img-" + index); 92 $this.find(".swiper-button-prev").addClass("btn-prev-" + index); 93 $this.find(".swiper-button-next").addClass("btn-next-" + index); 94 var swiperSingleNews = new Swiper(".brg-swiper-news-items-" + index, { 95 navigation: { 96 nextEl: ".btn-next-" + index, 97 prevEl: ".btn-prev-" + index 98 }, 99 breakpoints: { 100 320: { 101 spaceBetween: 10, 102 CSSWidthAndHeight: true, 103 slidesPerView: 'auto', 104 }, 105 768: { 106 slidesPerView: 2, 107 spaceBetween: 20 108 }, 109 991: { 110 slidesPerView: 3, 111 spaceBetween: 20 112 }, 113 992: { 114 slidesPerView: 3, 115 spaceBetween: 20, 116 } 117 } 118 }); 119 }); 120 121 //Event listing archive item BG 122 $('.brg-event-lists-item-thumb>img').each(function() { 123 var $src = $(this).attr('src'); 124 $(this).parent().css({ 125 'background': 'url(' + $src + ')', 126 'background-position': 'center center', 127 'background-repeat': 'no-repeat', 128 'background-size': 'cover', 129 }); 130 $(this).remove(); 131 }); 132 133 /* Homepage hero */ 134 $(".brg-hero-slider").each(function(index, element) { 135 var $this = $(this); 136 $this.find(".brg-swiper-hero-items").addClass("brg-swiper-hero-items-" + index); 137 138 var titleArray = []; 139 $this.children().children().children() 140 .each(function(index, element) { 141 titleArray.push($(this).data("title")); 142 }); 143 var thumbImg = []; 144 $this.children().children().children() 145 .each(function(index, element) { 146 thumbImg.push($(this).data("thumb")); 147 }); 148 149 var swiperPostStyleOne = new Swiper(".brg-swiper-hero-items-" + index, { 150 autoplay: { 151 delay: 5000, 152 }, 153 loop: true, 154 slidesPerView: 1, 155 spaceBetween: 0, 156 effect: 'fade', 157 keyboard: { 158 enabled: true 159 }, 160 pagination: { 161 el: ".swiper-pagination-nested", 162 clickable: true, 163 renderBullet: function(index, className) { 164 return ( 165 '<div class="' + 166 className + 167 '">' + 168 '<span class="brg-hero-slide-progress">' + 169 "</span>" + 170 '<div class="brg-hero-single-progress-wrapper">' + 171 '<div class="brg-hero-slide-progress-thumb" style="background: url(' + 172 thumbImg[index] + 173 ');">' + 174 "</div>" + 175 '<h6 class="brg-hero-slide-progress-title">' + 176 titleArray[index] + 177 "</h6>" + 178 "</div>" + 179 "</div>" 180 ); 181 } 182 } 183 }); 184 185 }); 186 187 /* Industry News Slider */ 188 $(".brg-swiper-industry-news-wrapper").each(function(index, element) { 189 var $this = $(this); 190 $this.find(".brg-swiper-industry-news-items").addClass("brg-swiper-industry-news-items-" + index); 191 var swiperIndustryNews = new Swiper(".brg-swiper-industry-news-items-" + index, { 192 mousewheel: { 193 releaseOnEdges: true, 194 }, 195 freeMode: true, 196 followFinger: true, 197 grabCursor: true, 198 scrollbar: { 199 el: ".brg-swiper-industry-news-swiper-scrollbar", 200 draggable: true, 201 }, 202 breakpoints: { 203 320: { 204 spaceBetween: 15, 205 CSSWidthAndHeight: true, 206 slidesPerView: 'auto', 207 }, 208 768: { 209 slidesPerView: 2, 210 spaceBetween: 30 211 }, 212 991: { 213 slidesPerView: 3, 214 spaceBetween: 40 215 }, 216 992: { 217 slidesPerView: 3, 218 spaceBetween: 60, 219 } 220 } 221 }); 222 }); 223 224 /* New Music Slider */ 225 $(".brg-swiper-new-music-wrapper").each(function(index, element) { 226 var $this = $(this); 227 $this.find(".brg-swiper-new-music-items").addClass("brg-swiper-new-music-items-" + index); 228 $this.find(".swiper-button-prev").addClass("btn-prev-" + index); 229 $this.find(".swiper-button-next").addClass("btn-next-" + index); 230 var arrowNextInt = false, 231 arrowPrevInt = false;
232 var swiperNewMusic = new Swiper(".brg-swiper-new-music-items-" + index, { 233 autoplay: { 234 delay: 3000, 235 }, 236 slidesPerView: 'auto', 237 spaceBetween: 40, 238 mousewheelControl: true, 239 loop: true, 240 speed: 2500, 241 navigation: { 242 nextEl: '.swiper-arrow.next.next-'+index, 243 prevEl: '.swiper-arrow.prev.prev-'+index 244 }, 245 breakpoints: { 246 0: { 247 slidesPerView: 'auto', 248 centeredSlides: 0, 249 centeredSlidesBounds: 0, 250 spaceBetween: 20, 251 }, 252 480: { 253 slidesPerView: 'auto', 254 centeredSlides: 0, 255 centeredSlidesBounds: 0, 256 spaceBetween: 20, 257 }, 258 768: { 259 slidesPerView: 'auto', 260 spaceBetween: 40, 261 }, 262 992: { 263 slidesPerView: 'auto', 264 spaceBetween: 40, 265 }, 266 1200: { 267 slidesPerView: 'auto', 268 spaceBetween: 40, 269 } 270 } 271 }); 272// $(".brg-swiper-new-music-items-" + index).on('mouseover', function(e){ 273// swiperNewMusic.autoplay.stop(); 274// }) 275// $(".brg-swiper-new-music-items-" + index).on('mouseout', function(e){ 276// swiperNewMusic.autoplay.start(); 277// }) 278// $(".swiper-arrow.next.next-" + index).on('mouseover', function(e){ 279// swiperNewMusic.slideNext(); 280// }); 281// $(".swiper-arrow.prev.prev-" + index).on('mouseover', function(e){ 282// swiperNewMusic.slidePrev(); 283// }); 284 285 $('.swiper-arrow.next-' + index).mouseover(function() { 286 arrowNextInt = setInterval(function() { 287 $('.swiper-arrow.next-' + index).trigger('click'); 288 }, 100); 289 }); 290 291 $('.swiper-arrow.next-' + index).mouseout(function() { 292 clearInterval(arrowNextInt); 293 arrowNextInt = false; 294 }); 295 296 $('.swiper-arrow.prev-' + index).mouseover(function() { 297 arrowPrevInt = setInterval(function() { 298 $('.swiper-arrow.prev-' + index).trigger('click'); 299 }, 100); 300 }); 301 302 $('.swiper-arrow.prev-' + index).mouseout(function() { 303 clearInterval(arrowPrevInt); 304 arrowPrevInt = false; 305 }); 306 }); 307 308 309 if($(".brg-hero-img, .brg-hero-slider")[0]) { 310 $("body").addClass("brg-have-hero-bg"); 311 } 312 313 314 $('#brg-load-more').click(function(){ 315 316 var button = $(this), 317 data = { 318 'action': 'brg_post_load_more', 319 'query': brg_post_load_more.posts, 320 'page' : brg_post_load_more.current_page, 321 'nonce': brg_post_load_more.nonce 322 }; 323 324 $.ajax({ 325 url : brg_post_load_more.ajaxurl, 326 data : data, 327 type : 'POST', 328 beforeSend : function ( xhr ) { 329 button.text('Loading...'); 330 }, 331 success : function( data ){ 332 if( data ) { 333 button.text( 'Load More' ); 334 $('.brg-load-more-post-insde').append(data); 335 brg_post_load_more.current_page++; 336 if ( brg_post_load_more.current_page == brg_post_load_more.max_page ) 337 button.remove(); 338 } else { 339 button.remove(); 340 } 341 } 342 }); 343 }); 344 345 346 /* Load More With Filter*/ 347 $('.brg-load-more-posts-with-filter-wrapper').on("click", "#brg-btn-load-more-with-filter", function () { 348 var getPage = parseInt($(this).attr("page")); 349 currentVal = ""; 350 if ($(".brg-category-lists .active").length > 0) { 351 var currentVal = parseInt( 352 $(".brg-category-lists .active a").attr("term-details") 353 ); 354 } 355 var getTotal = parseInt($("#total-post").attr("total")); 356 $.ajax({ 357 url: brg_loadmore__with_filter_params.ajaxurl, 358 data: { 359 action: "loadmore_btn_with_filter_action", 360 page: getPage, 361 termid: currentVal, 362 }, 363 type: "POST", 364 success: function (data) { 365 if (data) { 366 $(".brg-load-more-with-filter-post-inside").append(data); 367 getPage++; 368 $("#brg-btn-load-more-with-filter").attr("page", getPage); 369 console.log(getTotal); 370 if (getPage == getTotal) $("#brg-btn-load-more-with-filter").hide(); 371 } else { 372 $("#brg-btn-load-more-with-filter").hide(); 373 } 374 }, 375 }); 376 }); 377 378 $('.brg-load-more-posts-with-filter-wrapper').on("click", ".brg-category-lists a", function () { 379 if ($("#brg-btn-load-more-with-filter").length > 0) { 380 $("#brg-btn-load-more-with-filter").hide(); 381 } 382 $("#brg-btn-load-more-with-filter").show(); 383 jQuery(".brg-category-lists li").removeClass("active"); 384 $(this).parent("li").toggleClass("active"); 385 jQuery(".brg-category-lists li a").css("pointer-events", "none"); 386 387 var currentVal = $(this).attr("term-details"); 388 389 $.ajax({ 390 url: brg_loadmore__with_filter_params.ajaxurl, 391 data: { 392 action: "loadmore_filter_action", 393 termid: currentVal, 394 }, 395 type: "POST", 396 success: function (data) { 397 $(".brg-load-more-with-filter-post-inside").html(data); 398 $("#brg-btn-load-more-with-filter").attr("page", 1); 399 jQuery(".brg-category-lists li a").removeAttr("style"); 400 var getTotal = parseInt($("#total-post").attr("total")); 401 var getPage = parseInt($("#brg-btn-load-more-with-filter").attr("page")); 402 if (getPage >= getTotal) { 403 $("#brg-btn-load-more-with-filter").hide(); 404 } 405 }, 406 }); 407 }); 408 409 //Elementor 410 /* Load More With Filter*/ 411 $('.brg-load-more-posts-with-filter-wrapper-el').on("click", "#brg-btn-load-more-with-filter", function () { 412 var getPage = parseInt($(this).attr("page")); 413 currentVal = ""; 414 if ($(".brg-category-lists .active").length > 0) { 415 var currentVal = parseInt( 416 $(".brg-category-lists .active a").attr("term-details") 417 ); 418 } 419 var getTotal = parseInt($("#total-post").attr("total")); 420 $.ajax({ 421 url: loadmore_filter_action_el_params.ajaxurl, 422 data: { 423 action: "loadmore_btn_with_filter_action_el", 424 page: getPage, 425 termid: currentVal, 426 }, 427 type: "POST", 428 success: function (data) { 429 if (data) { 430 $(".brg-load-more-with-filter-post-inside").append(data); 431 getPage++; 432 $("#brg-btn-load-more-with-filter").attr("page", getPage); 433 console.log(getTotal); 434 if (getPage == getTotal) $("#brg-btn-load-more-with-filter").hide(); 435 } else { 436 $("#brg-btn-load-more-with-filter").hide(); 437 } 438 }, 439 }); 440 }); 441 442 $('.brg-load-more-posts-with-filter-wrapper-el').on("click", ".brg-category-lists a", function () { 443 if ($("#brg-btn-load-more-with-filter").length > 0) { 444 $("#brg-btn-load-more-with-filter").hide(); 445 } 446 $("#brg-btn-load-more-with-filter").show(); 447 jQuery(".brg-category-lists li").removeClass("active"); 448 $(this).parent("li").toggleClass("active"); 449 jQuery(".brg-category-lists li a").css("pointer-events", "none"); 450 451 var currentVal = $(this).attr("term-details"); 452 453 $.ajax({ 454 url: loadmore_filter_action_el_params.ajaxurl, 455 data: { 456 action: "loadmore_filter_action_el", 457 termid: currentVal, 458 }, 459 type: "POST", 460 success: function (data) { 461 $(".brg-load-more-with-filter-post-inside").html(data); 462 $("#brg-btn-load-more-with-filter").attr("page", 1); 463 jQuery(".brg-category-lists li a").removeAttr("style"); 464 var getTotal = parseInt($("#total-post").attr("total")); 465 var getPage = parseInt($("#brg-btn-load-more-with-filter").attr("page")); 466 if (getPage >= getTotal) { 467 $("#brg-btn-load-more-with-filter").hide(); 468 } 469 }, 470 }); 471 }); 472 473 jQuery(".brg-category-lists li a:first").trigger("click"); 474 setTimeout(function () { 475 jQuery(".brg-load-more-with-filter-post-inside").removeAttr("style"); 476 }, 100); 477 478 //Event listing archive item BG 479 $('.brg-popup-from-thumb>img').each(function() { 480 var $src = $(this).attr('src'); 481 $(this).parent().css({ 482 'background': 'url(' + $src + ')', 483 'background-position': 'center center', 484 'background-repeat': 'no-repeat', 485 'background-size': 'cover', 486 'min-height': '493px', 487 }); 488 $(this).remove(); 489 }); 490 //add target = blank 491 setTimeout(function () { 492 $('.elementor-widget-coderexperts-new-music .swiper-slide a').attr('target','_blank'); 493 }, 200); 494})(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.