1(function ($) { 2 "use strict"; 3 4 $(".bytf-trigger-open").on("click", function () { 5 $(".bytf__search-wrapper").addClass("opened"); 6 $(".bytf__body-overlay").addClass("opened"); 7 }); 8 $(".bytf__search-close-btn").on("click", function () { 9 $(".bytf__search-wrapper").removeClass("opened"); 10 $(".bytf__body-overlay").removeClass("opened"); 11 }); 12 $(".bytf__body-overlay").on("click", function () { 13 $(".bytf__search-wrapper").removeClass("opened"); 14 $(".bytf__body-overlay").removeClass("opened"); 15 }); 16 17 /** 18 * Sticky Header 19 */ 20 var e = "", 21 g = 0, 22 d, 23 b, 24 c; 25 26 if ($('.bytf-sticky-header').length) { 27 $('.bytf-sticky-header').addClass('original').clone(true).insertAfter('.bytf-sticky-header').addClass('main-header-sticky rr-sticky-stt').removeClass('original'); 28 } 29 30 $(window).on("scroll", function () { 31 (b = $(window).scrollTop()), (c = $(window).height()), (d = $(window).width()), b < g ? (e = "up") : (e = "down"), (g = b), h(); 32 }); 33 34 35 36 function h() { 37 $(".main-header").hasClass("is-sticky") && 38 (b > 300 39 ? ($(".main-header-sticky.rr-sticky-stb").addClass("bytf-sticky-header-fixed"), $("#bytf-sticky-header-mobile").addClass("bytf-sticky-header-mobile-fixed")) 40 : ($(".main-header-sticky.rr-sticky-stb").removeClass("bytf-sticky-header-fixed"), $("#bytf-sticky-header-mobile").removeClass("bytf-sticky-header-mobile-fixed")), 41 e == "up" && b > 300 ? $(".main-header-sticky.rr-sticky-stt").addClass("bytf-sticky-header-fixed") : $(".main-header-sticky.rr-sticky-stt").removeClass("bytf-sticky-header-fixed")), 42 $(".main-header-sticky").parents("body").addClass("bytf-sticky-header-sticky"); 43 } 44 //End Sticky Header 45 46 /** 47 * post Gallery Thumb 48 */ 49 jQuery('.post__single-gallery-wrapper').marquee({ 50 gap: 15, 51 speed: 80, 52 delayBeforeStart: 0, 53 direction: 'left', 54 duplicated: true, 55 pauseOnHover: true, 56 startVisible:true, 57 }); 58 59 60 $(window).on("load", function () { 61 $("#bytf__loader").fadeOut(1000); 62 }); 63 64 /** 65 * MObile Menu 66 */ 67 $('#empath-mobile-menu').metisMenu(); 68 69 $('#empath-mobile-menu .dropdown > a').on('click', function (e) { 70 e.preventDefault(); 71 }); 72 73 $(".hamburger_menu").on("click", function (e) { 74 e.preventDefault(); 75 $(".slide-bar").toggleClass("show"); 76 $("body").addClass("on-side"); 77 $('.body-overlay').addClass('active'); 78 $(this).addClass('active'); 79 }); 80 81 $(".close-mobile-menu > a").on("click", function (e) { 82 e.preventDefault(); 83 $(".slide-bar").removeClass("show"); 84 $("body").removeClass("on-side"); 85 $('.body-overlay').removeClass('active'); 86 $('.hamburger_menu > a').removeClass('active'); 87 }); 88 89 $('.body-overlay').on('click', function () { 90 $(this).removeClass('active'); 91 $(".slide-bar").removeClass("show"); 92 $("body").removeClass("on-side"); 93 $('.hamburger-menu > a').removeClass('active'); 94 }); 95 if ($('.hidden-bar').length){ 96 //Menu Toggle Btn 97 $('.toggle-hidden-bar').on('click', function() { 98 $('body').addClass('active-hidden-bar'); 99 }); 100 101 //Menu Toggle Btn 102 $('.hidden-bar-back-drop, .hidden-bar .close-btn').on('click', function() { 103 $('body').removeClass('active-hidden-bar'); 104 }); 105 } 106 107 // Back to top 108 $(window).on('scroll', function() { 109 var scrolled = $(window).scrollTop(); 110 if (scrolled > 300) $('.back-top-btn').addClass('active'); 111 if (scrolled < 300) $('.back-top-btn').removeClass('active'); 112 }); 113 $('.back-top-btn').on('click', function() { 114 $('html, body').animate( 115 { 116 scrollTop: '0' 117 }, 118 1200 119 ); 120 }); 121 122 123 function ajax_active($scope, $) { 124 //One 125 var $container = $scope.find('.empath-post-grid-loadmore'); 126 if ($container.length > 0) { 127 $container.on('click',function(event){ 128 event.preventDefault(); 129 130 var $that = $(this); 131 var ajaxjsondata = $that.data('json_grid_meta'); 132 var empath_json_data = Object (ajaxjsondata); 133 134 var contentwrap = $scope.find('.grid-loadmore-content'), // item contentwrap 135 postperpage = parseInt(empath_json_data.posts_per_page), // post per page number 136 showallposts = parseInt(empath_json_data.total_post); // total posts count 137 138 var items = contentwrap.find('.pfy-grid-item'), 139 totalpostnumber = parseInt(items.length), 140 paged = parseInt( totalpostnumber / postperpage ) + 1; // paged number 141 142 $.ajax({ 143 url: empath_ajax.ajax_url, 144 type: 'POST', 145 data: { 146 action: 'empath_post_ajax_loading', 147 ajax_json_data: ajaxjsondata, 148 paged:paged 149 }, 150 beforeSend: function(){ 151 152 $('<i class="fa fa-spinner fa-spin" style="margin-left:10px"></i>').appendTo( "#empath-post-grid-loadmore" ).fadeIn(100); 153 }, 154 complete:function(){ 155 $scope.find('.empath-post-grid-loadmore .fa-spinner ').remove(); 156 } 157 }) 158 159 .done(function(data) { 160 161 var $pstitems = $(data); 162 $scope.find('.grid-loadmore-content').append( $pstitems ); 163 var newLenght = contentwrap.find('.pfy-grid-item').length; 164 165 if(showallposts <= newLenght){ 166 $scope.find('.empath-post-grid-loadmore').fadeOut(300,function(){ 167 $scope.find('.empath-post-grid-loadmore').remove(); 168 }); 169 } 170 171 }) 172 173 .fail(function() { 174 $scope.find('.empath-post-grid-loadmore').remove(); 175 }); 176 177 }); 178 } 179 180 //two 181 var $container = $scope.find('.empath-post-grid-loadmore-two'); 182 if ($container.length > 0) { 183 $container.on('click',function(event){ 184 event.preventDefault(); 185 186 var $that = $(this); 187 var ajaxjsondata = $that.data('json_grid_meta'); 188 var empath_json_data = Object (ajaxjsondata); 189 190 var contentwrap = $scope.find('.grid-loadmore-content-two'), // item contentwrap 191 postperpage = parseInt(empath_json_data.posts_per_page), // post per page number 192 showallposts = parseInt(empath_json_data.total_post); // total posts count 193 194 var items = contentwrap.find('.pfy-grid-item'), 195 totalpostnumber = parseInt(items.length), 196 paged = parseInt( totalpostnumber / postperpage ) + 1; // paged number 197 198 $.ajax({ 199 url: empath_ajax.ajax_url, 200 type: 'POST', 201 data: { 202 action: 'empath_post_ajax_loading_2', 203 ajax_json_data: ajaxjsondata, 204 paged:paged 205 }, 206 beforeSend: function(){ 207 208 $('<i class="fa fa-spinner fa-spin" style="margin-left:10px"></i>').appendTo( "#empath-post-grid-loadmore-two" ).fadeIn(100); 209 }, 210 complete:function(){ 211 $scope.find('.empath-post-grid-loadmore-two .fa-spinner ').remove(); 212 } 213 }) 214 215 .done(function(data) { 216 217 var $pstitems = $(data); 218 $scope.find('.grid-loadmore-content-two').append( $pstitems ); 219 var newLenght = contentwrap.find('.pfy-grid-item').length; 220 221 if(showallposts <= newLenght){ 222 $scope.find('.empath-post-grid-loadmore-two').fadeOut(300,function(){ 223 $scope.find('.empath-post-grid-loadmore-two').remove(); 224 }); 225 } 226 227 }) 228 229 .fail(function() { 230 $scope.find('.empath-post-grid-loadmore-two').remove(); 231 }); 232 233 }); 234 } 235 236 237 } 238 239 240 241 function testimonialActive($scope, $) { 242 243 var slider = new Swiper('.testimonial__active', { 244 "slidesPerView": 1, 245 "loop": true, 246 "speed": 2000, 247 "autoplay": { 248 "delay": 5000 249 }, 250 navigation: { 251 nextEl: ".testi-sl-nxt", 252 prevEl: ".testi-sl-prev" 253 }, 254 }); 255 } 256 257 258 function postSliderTwoActive($scope, $) { 259 var slider = new Swiper('.post_slider_two__active', { 260 "slidesPerView": 1, 261 "loop": true, 262 "speed": 2000, 263 "autoplay": { 264 "delay": 5000 265 }, 266 speed: 2000,
267 navigation: { 268 nextEl: ".testi-sl-nxt", 269 prevEl: ".testi-sl-prev" 270 }, 271 }); 272 } 273 function quoteSliderTwoActive($scope, $) { 274 var slider = new Swiper('.quoteslide__active', { 275 "slidesPerView": 1, 276 "loop": true, 277 "speed": 2000, 278 spaceBetween: 30, 279 "autoplay": { 280 "delay": 5000 281 }, 282 speed: 2000, 283 284 }); 285 } 286 287 /** 288 * Post Gallery Slider Active 289 * @param {Post gallery} $scope 290 * @param {*} $ 291 */ 292 function postGallerySliderActive($scope, $) { 293 $('.bytf__post__gallery-for').slick({ 294 slidesToShow: 1, 295 slidesToScroll: 1, 296 arrows: false, 297 fade: true, 298 asNavFor: '.bytf__post__gallery-nav' 299 }); 300 $('.bytf__post__gallery-nav').slick({ 301 slidesToShow: 4, 302 padding:10, 303 slidesToScroll: 1, 304 arrows: false, 305 asNavFor: '.bytf__post__gallery-for', 306 dots: false, 307 focusOnSelect: true, 308 responsive: [ 309 { 310 breakpoint: 991, 311 settings: { 312 slidesToShow: 3, 313 } 314 }, 315 { 316 breakpoint: 767, 317 settings: { 318 slidesToShow: 1, 319 } 320 } 321 ] 322 323 }); 324 } 325 326 function postCarouslActive($scope, $) { 327 var sliderThumbnail = new Swiper('.post_grid__active', { 328 slidesPerView: 4, 329 freeMode: true, 330 speed: 400, 331 spaceBetween: 5, 332 watchSlidesVisibility: true, 333 watchSlidesProgress: true, 334 "autoplay": { 335 "delay": 5000 336 }, 337 338 // Add breakpoints for responsiveness 339 breakpoints: { 340 // When window width is >= 320px 341 320: { 342 slidesPerView: 1, 343 spaceBetween: 5, 344 }, 345 // When window width is >= 480px 346 480: { 347 slidesPerView: 1, 348 spaceBetween: 5, 349 }, 350 // When window width is >= 768px 351 768: { 352 slidesPerView: 2, 353 spaceBetween: 5, 354 }, 355 // When window width is >= 1024px 356 1024: { 357 slidesPerView: 4, 358 spaceBetween: 5, 359 } 360 } 361 }); 362 } 363 function sliderThumbActive($scope, $) { 364 var sliderThumbnail = new Swiper('.post_slider_three__thumb', { 365 slidesPerView: 3, 366 freeMode: true, 367 spaceBetween: 36, 368 watchSlidesVisibility: true, 369 watchSlidesProgress: true, 370 371 // Add breakpoints for responsiveness 372 breakpoints: { 373 // When window width is >= 320px 374 320: { 375 slidesPerView: 1, 376 spaceBetween: 10, 377 }, 378 // When window width is >= 480px 379 480: { 380 slidesPerView: 1, 381 spaceBetween: 20, 382 }, 383 // When window width is >= 768px 384 768: { 385 slidesPerView: 2, 386 spaceBetween: 30, 387 }, 388 // When window width is >= 1024px 389 1024: { 390 slidesPerView: 3, 391 spaceBetween: 36, 392 } 393 } 394 }); 395 396 397 var slider = new Swiper('.post_slider_three__active', { 398 effect: "slide", 399 parallax: true, 400 speed: 1600, 401 autoplay: { 402 delay: 10000, 403 disableOnInteraction: false 404 }, 405 navigation: { 406 nextEl: '.swiper-button-next', 407 prevEl: '.swiper-button-prev', 408 }, 409 thumbs: { 410 swiper: sliderThumbnail 411 } 412 }); 413 414 //Slider Two 415 416 $('.slider-for').slick({ 417 slidesToShow: 1, 418 slidesToScroll: 1, 419 arrows: false, 420 fade: true, 421 asNavFor: '.slider-nav' 422 }); 423 $('.slider-nav').slick({ 424 slidesToShow: 5, 425 slidesToScroll: 1, 426 vertical:true, 427 arrows: false, 428 infinite: true, 429 centerMode: true, 430 asNavFor: '.slider-for', 431 dots: false, 432 focusOnSelect: true, 433 verticalSwiping:true, 434 responsive: [ 435 { 436 breakpoint: 992, 437 settings: { 438 vertical: false, 439 slidesToShow: 3, 440 } 441 }, 442 { 443 breakpoint: 768, 444 settings: { 445 vertical: false, 446 slidesToShow: 3, 447 } 448 }, 449 { 450 breakpoint: 580, 451 settings: { 452 vertical: false, 453 slidesToShow: 2, 454 } 455 }, 456 { 457 breakpoint: 380, 458 settings: { 459 vertical: false, 460 slidesToShow: 2, 461 } 462 } 463 ] 464 }); 465 466 } 467 468 $('.bytf_breaking_active').slick({ 469 slidesToScroll: 1, 470 arrows: true, 471 dots: false, 472 vertical: true, 473 verticalSwiping: true, 474 nextArrow: '', 475 prevArrow: '<i class="fal fa-angle-down"></i>', 476 }); 477 478 479 480 $('.bookmark-icon').on('click', function(e) { 481 e.preventDefault(); 482 483 var post_id = $(this).data('post-id'); 484 var $this = $(this); 485 486 $.ajax({ 487 type: 'POST', 488 url: bookmarkAjax.ajaxurl, 489 data: { 490 action: 'handle_bookmark', 491 post_id: post_id, 492 nonce: bookmarkAjax.nonce 493 }, 494 success: function(response) { 495 if (response.success) { 496 if (response.data === 'Bookmark added') { 497 $this.addClass('bookmarked'); 498 showToast(` 499 <div class="bookmark__content-wrp"> 500 <i class="fas fa-solid fa-check check"></i> 501 <div class="bokmark_msg_">
502 <span>Bookmark added</span> 503 </div> 504 </div> 505 `); 506 } else if (response.data === 'Bookmark removed') { 507 $this.removeClass('bookmarked'); 508 showToast( ` 509 <div class="bookmark__content-wrp"> 510 <i class="far fa-trash"></i> 511 <div class="bokmark_msg_"> 512 <span>Bookmark Removed</span> 513 </div> 514 </div> 515 `); 516 } 517 updateBookmarkCount(); 518 } else { 519 showToast(` 520 <div class="bookmark__content-wrp"> 521 <i class="fal fa-lock"></i> 522 <div class="bokmark_msg_"> 523 <span>Please login to add bookmark</span> 524 </div> 525 </div> 526 `); 527 } 528 } 529 }); 530 }); 531 532 function showToast(message) { 533 var $toast = $(` 534 <div class="toast"> ${message} </div> 535 `); 536 $('body').append($toast); 537 $toast.fadeIn(400).delay(2000).fadeOut(400, function() { 538 $(this).remove(); 539 }); 540 } 541 542 /** 543 * Dark Mode 544 */ 545 window.onload = function () { 546 // Dark 547 const toggleSwitch = document.querySelector( 548 '.empath-switch-box__input' 549 ); 550 const currentTheme = localStorage.getItem("theme"); 551 if (currentTheme) { 552 document.documentElement.setAttribute("data-theme", currentTheme); 553 if (currentTheme === "dark") { 554 toggleSwitch.checked = true; 555 } 556 } 557 function switchTheme(e) { 558 if (e.target.checked) { 559 document.documentElement.setAttribute("data-theme", "dark"); 560 localStorage.setItem("theme", "dark"); 561 } else { 562 document.documentElement.setAttribute("data-theme", "light"); 563 localStorage.setItem("theme", "light"); 564 } 565 } 566 if (toggleSwitch) { 567 toggleSwitch.addEventListener("change", switchTheme, false); 568 } 569 }; 570 571 $(function () { 572 /*var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')) 573 var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { 574 return new bootstrap.Tooltip(tooltipTriggerEl); 575 }); 576 */ 577 578 $('[data-toggle="tooltip"]').tooltip(); 579}) 580 function movingPost($scope, $) {
581 $(".post-ov-sroller").marquee({ 582 gap: 0, 583 speed: 80, 584 delayBeforeStart: 0, 585 direction: "left", 586 duplicated: true, 587 pauseOnHover: true, 588 startVisible: true, 589 }); 590 } 591 592 jQuery(function(){ 593 jQuery("#bgndVideo").YTPlayer(); 594 }); 595 596 597 598 599 $(window).on('elementor/frontend/init', function () { 600 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-ajax.default', ajax_active); 601 elementorFrontend.hooks.addAction('frontend/element_ready/empath-testimonial.default', testimonialActive); 602 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-slider.default', postSliderTwoActive); 603 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-galley.default', postGallerySliderActive); 604 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-slider-tw.default', sliderThumbActive); 605 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-moving.default', movingPost); 606 elementorFrontend.hooks.addAction('frontend/element_ready/empath-quote.default', quoteSliderTwoActive); 607 elementorFrontend.hooks.addAction('frontend/element_ready/empath-post-grid-car.default', postCarouslActive); 608 609 }); 610 611 612 613})(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.