1jQuery(document).ready(function($){ 2 "use strict"; 3 4 function alignModal(){ 5 var modalDialog = $(this).find(".modal-dialog"); 6 // Applying the top margin on modal dialog to align it vertically center 7 modalDialog.css("margin-top", Math.max(0, ($(window).height() - modalDialog.height()) / 2)); 8 } 9 10 // Align modal when it is displayed 11 $(".modal").on("shown.bs.modal", alignModal); 12 13 // Align modal when user resize the window 14 $(window).on("resize", function(){ 15 $(".modal:visible").each(alignModal); 16 }); 17 18 var a = $('.offscreen-navigation .menu'); 19 20 if (a.length) { 21 a.children("li").addClass("menu-item-parent"); 22 a.find(".menu-item-has-children > a").on("click", function (e) { 23 e.preventDefault(); 24 $(this).toggleClass("opened"); 25 var n = $(this).next(".sub-menu"), 26 s = $(this).closest(".menu-item-parent").find(".sub-menu"); 27 a.find(".sub-menu").not(s).slideUp(250).prev('a').removeClass('opened'), n.slideToggle(250) 28 }); 29 a.find('.menu-item:not(.menu-item-has-children) > a').on('click', function (e) { 30 $('.rt-slide-nav').slideUp(); 31 $('body').removeClass('slidemenuon'); 32 }); 33 } 34 35 $('.mean-bar .sidebarBtn').on('click', function (e) { 36 e.preventDefault(); 37 if ($('.rt-slide-nav').is(":visible")) { 38 $('.rt-slide-nav').slideUp(); 39 $('body').removeClass('slidemenuon'); 40 } else { 41 $('.rt-slide-nav').slideDown(); 42 $('body').addClass('slidemenuon'); 43 } 44 45 }); 46 47 $("body").mouseover(function(el){ 48 if( $(window).width() <= 1400 ){ 49 if(el.pageY<=11000){ 50 $('.class-schedule-wrap1 table tbody tr td .schedule-item-wrapper:hover .media').css('bottom','calc(100% - 150px)') 51 }else{ 52 $('.class-schedule-wrap1 table tbody tr td .schedule-item-wrapper:hover .media').css('bottom','calc(100% + 15px)') 53 } 54 } 55 }); 56 57 $('#site-navigation').navpoints({ 58 updateHash:true 59 }); 60 61 $('.rt-content, .rt-sidebar').theiaStickySidebar({ 62 // Settings 63 additionalMarginTop: 200, 64 additionalMarginBottom: 200 65 }); 66 67 //*loadmore ajax*/ 68 $('.departments_info').on('click', 'a.departments_title', function(e){ 69 e.preventDefault(); 70 var _this = $(this), 71 id = _this.data('id'), 72 target = _this.parents('#department-lode-area').find('.sigle-department-data'); 73 74 $.ajax({ 75 url: medilinkObj.ajaxurl, 76 data: { action : 'rt_single_department', id: id}, 77 type: 'POST', 78 beforeSend: function(){ 79 target.find('.loading').fadeIn('slow'); 80 }, 81 success: function(resp){ 82 target.find('.loading').fadeOut('slow'); 83 target.html(resp.html); 84 }, 85 error: function(e){ 86 } 87 }); 88 return false; 89 }); 90 91 if ( medilinkObj.rtl == 'yes' ) { 92 var waiting_txt = 'Ú©Ù Û ØµØ¨Ø± Ú©ÙÛØ¯...'; 93 var nomoredata_txt = 'Ø§Ø·ÙØ§Ø¹Ø§Øª دÛÚ¯Ø±Û ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯'; 94 95 }else { 96 var waiting_txt = 'Loading...'; 97 var nomoredata_txt = 'No data remaining'; 98 } 99 100 $('.loadmore').on('click', 'a.rt-loadmore', function(e){ 101 e.preventDefault(); 102 var _this = $(this), 103 container = _this.parents('.rt-departments'), 104 wtgetData = container.data("settings"), 105 paged = container.attr('data-paged'), 106 contentWrap = container.find('.menu-list'), 107 loadmore = container.find('.loadmore'), 108 loadmorebtntxt= loadmore.find('a').text(); 109 $.ajax({ 110 url: medilinkObj.ajaxurl, 111 data: { action : 'rt_loadmore_department', data: wtgetData, page: parseInt(paged, 10)}, 112 type: 'POST', 113 beforeSend: function(){ 114 loadmore.find('a').text(waiting_txt); 115 }, 116 success: function(resp){ 117 console.log(resp); 118 container.attr('data-paged', parseInt(resp.page)); 119 if(resp.remaining){ 120 loadmore.find('a').text(loadmorebtntxt); 121 }else{ 122 loadmore.find('a').text(nomoredata_txt).attr('disabled', true); 123 } 124 var t = $(resp.html) 125 t.find('.rtin-item').addClass('test'); 126 contentWrap.append(resp.html); 127 }, 128 error: function(e){ 129 console.log(e); 130 } 131 }); 132 133 }); 134 135 //Doctor Load More 136 $('.loading-button').on('click', 'a.doctor-loadmore', function(e){ 137 e.preventDefault(); 138 var _this = $(this), 139 container = _this.parents('.rt-doctor'), 140 wtgetData = container.data("settings"), 141 paged = container.attr('data-paged'), 142 contentWrap = container.find('.doctor-list'), 143 loadmore = container.find('.loading-button'), 144 loadmorebtntxt= loadmore.find('a').text(); 145 $.ajax({ 146 url: medilinkObj.ajaxurl, 147 data: { action : 'rt_loadmore_doctor', data: wtgetData, page: parseInt(paged, 10)}, 148 type: 'POST', 149 beforeSend: function(){ 150 loadmore.find('a').text('Loading...'); 151 }, 152 success: function(resp){ 153 console.log(resp); 154 container.attr('data-paged', parseInt(resp.page)); 155 if(resp.remaining){ 156 loadmore.find('a').text(loadmorebtntxt); 157 }else{ 158 loadmore.find('a').text('No data remaining').attr('disabled', true); 159 } 160 var t = $(resp.html) 161 t.find('.rtin-item').addClass('test'); 162 contentWrap.append(resp.html); 163 }, 164 error: function(e){ 165 console.log(e); 166 } 167 }); 168 169 }); 170 171 //Header Search 172 $('a[href="#header-search"]').on("click", function (event) { 173 event.preventDefault(); 174 $("#header-search").addClass("open"); 175 $('#header-search > form > input[type="search"]').focus(); 176 }); 177 178 $("#header-search, #header-search button.close").on("click keyup", function (event) { 179 if ( 180 event.target === this || 181 event.target.className === "close" || 182 event.keyCode === 27 183 ) { 184 $(this).removeClass("open"); 185 } 186 }); 187 188 189 /* Scroll to top */ 190 $('.scrollToTop').on('click',function(){ 191 $('html, body').animate({scrollTop : 0},800); 192 return false;
193 }); 194 $(window).scroll(function(){ 195 if ($(this).scrollTop() > 100) { 196 $('.scrollToTop').fadeIn(); 197 } else { 198 $('.scrollToTop').fadeOut(); 199 } 200 }); 201 202 /* Search Box */ 203 $(".search-box-area").on('click', '.search-button, .search-close', function(event){ 204 event.preventDefault(); 205 if($('.search-text').hasClass('active')){ 206 $('.search-text, .search-close').removeClass('active'); 207 } 208 else{ 209 $('.search-text, .search-close').addClass('active'); 210 } 211 return false; 212 }); 213 214 215 216 /*------------------------------------- 217 Menu fixded 218 -------------------------------------*/ 219 if ($('header .header-main').length && $('header .header-main').hasClass('header-sticky')) { 220 var header_position = $('header .header-main').offset(), 221 lastScroll = 100; 222 $(window).on('scroll load', function (event) { 223 var st = $(this).scrollTop(); 224 if (st > header_position.top) { 225 ($(".header-table").length) ? $('header .header-table').addClass("header-fixed"): $('header .header-main').addClass("header-fixed"); 226 } else { 227 ($(".header-table").length) ? $('header .header-table').removeClass("header-fixed"): $('header .header-main').removeClass("header-fixed"); 228 } 229 if (st > lastScroll && st > header_position.top) { 230 ($(".header-table").length) ? $('header .header-table').addClass("hidden-menu"): $('header .header-main').addClass("hidden-menu"); 231 } else if (st <= lastScroll) { 232 ($(".header-table").length) ? $('header .header-table').removeClass("hidden-menu"): $('header .header-main').removeClass("hidden-menu"); 233 } 234 lastScroll = st; 235 if (st === 0) { 236 ($(".header-table").length) ? $('header .header-table').removeClass("header-fixed"): $('header .header-main').removeClass("header-fixed"); 237 } 238 }); 239 } 240 241 var makeSticky = function() { 242 if ($(".masthead-container").length > 0) { 243 var stc = $(".site-content "); 244 var out = $(".site-header"); 245 var headertop = $(".header-top-bar"); 246 var s = $(".masthead-container"); 247 var sw = $(".non-trheader .site-wrp"); 248 var pos = stc.position(); 249 var tHeight = out.outerHeight(); 250 $(window).scroll(function() { 251 var windowpos = $(window).scrollTop(); 252 if (windowpos >= pos.top + 1) { 253 //s.removeClass("animated fadeIn"); 254 sw.removeClass("opt-slideInUp"); 255 s.addClass("stick animated slideInDown"); 256 sw.addClass("opt-slideInUp"); 257 sw.css('padding-top', tHeight + 'px'); 258 headertop.addClass("animated slideInDown"); 259 } else { 260 s.removeClass("stick animated slideInDown"); 261 //s.addClass("animated slideInUp"); 262 sw.removeClass("opt-slideInUp"); 263 headertop.removeClass("animated slideInDown"); 264 //s.addClass("animated fadeIn"); 265 sw.css('padding-top', 0); 266 } 267 }); 268 } 269 } 270 if ( $('body').hasClass('non-stick') ) { 271 makeSticky(); 272 } 273 274 275 /* MeanMenu - Mobile Menu */ 276 /*$('#site-navigation nav').meanmenu({ 277 meanMenuContainer: '#meanmenu', 278 meanScreenWidth: medilinkObj.meanWidth, 279 removeElements: "#masthead", 280 siteLogo: medilinkObj.siteLogo 281 }); 282 */ 283 284 /* Header Right Menu */ 285 $('.additional-menu-area').on('click', '.side-menu-trigger', function (e) { 286 e.preventDefault(); 287 var width = $('.sidenav').width(); 288 if (width==280) { 289 $('.sidenav').width(0); 290 } 291 else{ 292 $('.sidenav').width(280); 293 } 294 }); 295 $('.additional-menu-area').on('click', '.closebtn', function (e) { 296 e.preventDefault(); 297 $('.sidenav').width(0); 298 }); 299 300 /* Mega Menu */ 301 $('.site-header .main-navigation ul > li.mega-menu').each(function() { 302 // total num of columns 303 var items = $(this).find(' > ul.sub-menu > li').length; 304 // screen width 305 var bodyWidth = $('body').outerWidth(); 306 // main menu link width 307 var parentLinkWidth = $(this).find(' > a').outerWidth(); 308 // main menu position from left 309 var parentLinkpos = $(this).find(' > a').offset().left; 310 311 var width = items * 220; 312 var left = (width/2) - (parentLinkWidth/2); 313 314 var linkleftWidth = parentLinkpos + (parentLinkWidth/2); 315 var linkRightWidth = bodyWidth - ( parentLinkpos + parentLinkWidth ); 316 317 // exceeds left screen 318 if( (width/2)>linkleftWidth ){ 319 $(this).find(' > ul.sub-menu').css({ 320 width: width + 'px', 321 right: 'inherit', 322 left: '-' + parentLinkpos + 'px' 323 }); 324 } 325 // exceeds right screen 326 else if ( (width/2)>linkRightWidth ) { 327 $(this).find(' > ul.sub-menu').css({ 328 width: width + 'px', 329 left: 'inherit', 330 right: '-' + linkRightWidth + 'px' 331 }); 332 } 333 else{ 334 $(this).find(' > ul.sub-menu').css({ 335 width: width + 'px', 336 left: '-' + left + 'px' 337 }); 338 } 339 }); 340 // Scripts needs loading inside content area 341 rdtheme_content_ready_scripts(); 342 /* WooCommerce */ 343 rdtheme_wc_scripts($); 344 rdtheme_imgslider_scripts($); 345 346}); 347 348(function($){ 349 "use strict"; 350 351 /*------------------------------------- 352 Select2 activation code 353 -------------------------------------*/ 354 var checkdir = 'ltr'; 355 if ( medilinkObj.rtl == 'yes' ) { 356 var checkdir = 'rtl'; 357 } 358 if ($('select.select2').length) { 359 $('select.select2').select2({ 360 dir: checkdir, 361 theme: 'classic', 362 dropdownAutoWidth: true, 363 width: '100%' 364 }); 365 } 366 // Window Load+Resize 367 $(window).on('load resize', function () { 368 // Define the maximum height for mobile menu 369 var wHeight = $(window).height(); 370 wHeight = wHeight - 50; 371 $('.mean-nav > ul').css('max-height', wHeight + 'px'); 372 }); 373 374 // Window Load 375 $(window).on('load', function () { 376 // Owl Slider 377 rdtheme_content_load_scripts(); 378 // Preloader 379 $('#preloader').fadeOut('slow', function () { 380 $(this).remove(); 381 }); 382 rdtheme_imgslider_scripts(); 383 }); 384 // Slider Resize 385 $(window).on('resize', function () { 386 rdtheme_slider_fullscreen(); 387 rdtheme_imgslider_scripts(); 388 }); 389 390 // Sticky Menu Resize 391 $(window).on('resize', function () { 392 if ($(".masthead-container").length > 0) { 393 var s = $(".masthead-container"); 394 var sw = $(".site-wrp"); 395 var pos = s.position(); 396 var tHeight = s.outerHeight(); 397 $(window).scroll(function() { 398 var windowpos = $(window).scrollTop(); 399 if (windowpos >= pos.top + 1) { 400 s.removeClass("slideInUp"); 401 sw.removeClass("opt-slideInUp"); 402 s.addClass("stick animated slideInDown"); 403 sw.addClass("opt-slideInUp"); 404 //sw.css('padding-top', tHeight + 'px'); 405 } else { 406 s.removeClass("stick animated slideInDown"); 407 sw.removeClass("opt-slideInUp"); 408 s.addClass("animated slideInUpCustonAnimetion"); 409 //sw.css('padding-top', 0); 410 } 411 }); 412 } 413 414 }); 415 416 // Elementor 417 $( window ).on( 'elementor/frontend/init', function() { 418 if (elementorFrontend.isEditMode()) { 419 elementorFrontend.hooks.addAction( 'frontend/element_ready/widget', function(){ 420 rdtheme_content_ready_scripts() 421 rdtheme_content_load_scripts(); 422 rdtheme_imgslider_scripts(); 423 424 } ); 425 } 426 } ); 427 428})(jQuery); 429 430 431function rdtheme_content_ready_scripts(){ 432 var $ = jQuery; 433 434 /* Counter */ 435 if ( typeof $.fn.counterUp == 'function') { 436 $('.rt-el-counter .rt-counter-num').counterUp({ 437 delay: $(this).data('rtsteps'), 438 time: $(this).data('rtspeed') 439 }); 440 } 441 442 /*------------------------------------- 443 Tween-Max 444 -------------------------------------*/ 445 446 $(".motion-effects-wrap").mousemove(function (e) { 447 parallaxIt(e, ".motion-effects1", -100); 448 parallaxIt(e, ".motion-effects2", -200); 449 parallaxIt(e, ".motion-effects3", 100); 450 // parallaxIt(e, ".motion-effects4", 200); 451 // parallaxIt(e, ".motion-effects5", -50); 452 // parallaxIt(e, ".motion-effects6", 50); 453 }); 454 function parallaxIt(e, target_class, movement) { 455 let $wrap = $(e.target).parents(".motion-effects-wrap"); 456 if (!$wrap.length) return; 457 let $target = $wrap.find(target_class); 458 let relX = e.pageX - $wrap.offset().left; 459 let relY = e.pageY - $wrap.offset().top; 460 TweenMax.to($target, 1, { 461 x: ((relX - $wrap.width() / 2) / $wrap.width()) * movement, 462 y: ((relY - $wrap.height() / 2) / $wrap.height()) * movement, 463 }); 464 } 465
466 /* Slider */ 467 if ( typeof $.fn.nivoSlider == 'function') { 468 $('.rt-nivoslider').nivoSlider({ 469 effect: 'boxRainReverse', 470 slices: 15, 471 boxCols: 8, 472 boxRows: 4, 473 animSpeed: 500, 474 pauseTime: 3000, 475 startSlide: 0, 476 directionNav: true, 477 controlNav: true, 478 controlNavThumbs: false, 479 pauseOnHover: false, 480 manualAdvance: true, 481 prevText: '', 482 nextText: '', 483 randomStart: false, 484 beforeChange: function() {}, 485 afterChange: function() {}, 486 slideshowEnd: function() {}, 487 lastSlide: function() {}, 488 afterLoad: function() {} 489 }); 490 rdtheme_slider_fullscreen(); 491 } 492 } 493 494function rdtheme_content_load_scripts(){ 495 var $ = jQuery; 496 497 //Parallax Scene for Icons 498 if($('.parallax-scene-1').length){ 499 var scene = $('.parallax-scene-1').get(0); 500 var parallaxInstance = new Parallax(scene); 501 } 502 if($('.parallax-scene-2').length){ 503 var scene = $('.parallax-scene-2').get(0); 504 var parallaxInstance = new Parallax(scene); 505 } 506 if($('.parallax-scene-3').length){ 507 var scene = $('.parallax-scene-3').get(0); 508 var parallaxInstance = new Parallax(scene); 509 } 510 511 if($('.rt-paroller').length){ 512 $('.rt-paroller').paroller({ 513 }); 514 } 515 516 //Slick Carousel 517 var slickOptions1 = { 518 slidesToShow: 1, 519 slidesToScroll: 1, 520 arrows: true, 521 rtl: slickRtl, 522 autoplay: false, 523 asNavFor: '.carousel-nav', 524 prevArrow: '<span class="slick-prev slick-navigation"><i class="fa fa-angle-left" aria-hidden="true"></i></span>', 525 nextArrow: '<span class="slick-next slick-navigation"><i class="fa fa-angle-right" aria-hidden="true"></i></span>' 526 } 527 var slickOptions2 = { 528 slidesToShow: 5, 529 slidesToScroll: 1, 530 asNavFor: '.carousel-content', 531 dots: false, 532 arrows: true, 533 rtl: slickRtl, 534 centerPadding: '0px', 535 focusOnSelect: true, 536 responsive: [{ 537 breakpoint: 991, 538 settings: { 539 slidesToShow: 3, 540 slidesToScroll: 1 541 } 542 }, { 543 breakpoint: 767, 544 settings: { 545 slidesToShow: 3, 546 slidesToScroll: 1 547 } 548 }, { 549 breakpoint: 479, 550 settings: { 551 slidesToShow: 1, 552 slidesToScroll: 1 553 } 554 }] 555 } 556 557 if ( medilinkObj.rtl == 'yes' ) { 558 // options 1 559 slickOptions1.rtl = true; 560 slickOptions1.prevArrow = '<span class="slick-prev slick-navigation"><i class="fa fa-angle-right" aria-hidden="true"></i></span>'; 561 slickOptions1.nextArrow = '<span class="slick-next slick-navigation"><i class="fa fa-angle-left" aria-hidden="true"></i></span>'; 562 563 // options 2 564 slickOptions2.rtl = true; 565 566 } 567 //console.log('slickOptions2', slickOptions2); 568 var SlickCarousel = $('.slick-carousel-wrap'); 569 if (SlickCarousel.length) { 570 SlickCarousel.find('.carousel-content').slick(slickOptions1); 571 SlickCarousel.find('.carousel-nav').slick(slickOptions2); 572 } 573 574 var slickRtl = false; 575 if ( medilinkObj.rtl == 'yes' ) { 576 var slickRtl = true; 577 } 578 $(".slider-for").slick({ 579 rtl: slickRtl, 580 slidesToShow: 1, 581 slidesToScroll: 1, 582 arrows: false, 583 asNavFor: ".slider-nav", 584 transformEnabled: false, 585 }); 586 $(".slider-nav").slick({ 587 slidesToShow: 4, 588 slidesToScroll: 1, 589 asNavFor: ".slider-for", 590 dots: false, 591 arrows: true, 592 centerMode: false, 593 focusOnSelect: true, 594 }); 595 596 597 /*------------------------------------- 598 Masonry 599 -------------------------------------*/ 600 var isotopeRtl = true; 601 if ( medilinkObj.rtl == 'yes' ) { 602 var isotopeRtl = false; 603 } 604 605 var galleryIsoContainer = $('.no-equal-gallery'); 606 if (galleryIsoContainer.length) { 607 var blogGallerIso = galleryIsoContainer.imagesLoaded(function() { 608 blogGallerIso.isotope({ 609 itemSelector: '.no-equal-item', 610 originLeft: isotopeRtl, 611 masonry: { 612 columnWidth: '.no-equal-item' 613 } 614 }); 615 }); 616 } 617 618 /*------------------------------------- 619 Popup 620 -------------------------------------*/ 621 var yPopup = $(".popup-youtube"); 622 if (yPopup.length) { 623 yPopup.magnificPopup({ 624 disableOn: 700, 625 type: 'iframe', 626 mainClass: 'mfp-fade', 627 removalDelay: 160, 628 preloader: false, 629 fixedContentPos: false 630 }); 631 } 632 if ($('.zoom-gallery').length) { 633 $('.zoom-gallery').each(function () { // the containers for all your galleries 634 $(this).magnificPopup({ 635 delegate: 'a.ne-zoom', // the selector for gallery item 636 type: 'image', 637 gallery: { 638 enabled: true 639 } 640 }); 641 }); 642 } 643 644 /* Owl Slider */ 645 if (typeof $.fn.owlCarousel == 'function') { 646 647 $(".owl-custom-nav .owl-next").on('click',function(){ 648 $(this).closest('.owl-wrap').find('.owl-carousel').trigger('next.owl.carousel'); 649 }); 650 $(".owl-custom-nav .owl-prev").on('click',function(){ 651 $(this).closest('.owl-wrap').find('.owl-carousel').trigger('prev.owl.carousel'); 652 }); 653 654 $(".rt-owl-carousel").each(function() { 655 var options = $(this).data('carousel-options'); 656 if ( medilinkObj.rtl == 'yes' ) { 657 options['rtl'] = true; //@rtl 658 options['navText'] = ["<i class='fa fa-angle-right'></i>","<i class='fa fa-angle-left'></i>"]; 659 } 660 $(this).owlCarousel(options); 661 }); 662 } 663 664 /* Isotope */ 665 /* var $grid = $('.rt-masonry-grid').imagesLoaded( function() { 666 $grid.masonry({ 667 // set itemSelector so .grid-sizer is not used in layout 668 itemSelector: '.rt-grid-item', 669 // use element for option 670 columnWidth: '.rt-grid-sizer', 671 percentPosition: true 672 }); 673 });*/ 674 675 676 677 678 if (typeof $.fn.isotope == 'function') { 679 var $rtGalleryContainer = $('.rt-isotope-wrapper .rt-isotope-content'); 680 $rtGalleryContainer.isotope({ 681 filter: '*', 682 isOriginLeft: isotopeRtl, 683 animationOptions: { 684 duration: 750, 685 easing: 'linear', 686 queue: false 687 } 688 }); 689 690 $('.rt-isotope-tab a').on('click',function(){ 691 var $parent = $(this).closest('.rt-isotope-wrapper'), 692 selector = $(this).attr('data-filter'); 693 694 $parent.find('.rt-isotope-tab .current').removeClass('current'); 695 $(this).addClass('current'); 696 $isotope_instance = $parent.find('.rt-isotope-content').isotope({ 697 filter: selector, 698 getSortData: { 699 custom_order: '[data-custom_order]', // value of attribute 700 }, 701 animationOptions: { 702 duration: 750, 703 easing: 'linear', 704 queue: false 705 } 706 }); 707 //console.log('isotope_instance', $isotope_instance); 708 setTimeout(function () { 709 $isotope_instance.isotope({ sortBy : 'custom_order' }); 710 }, 500) 711 712 return false;
713 }); 714 } 715 716 717 718/* 719 if (typeof $.fn.isotope == 'function') { 720 var $rtGalleryContainer = $('.rt-isotope-wrapper .rt-isotope-content'); 721 $rtGalleryContainer.isotope({ 722 filter: '*', 723 animationOptions: { 724 duration: 750, 725 easing: 'linear', 726 queue: false 727 } 728 }); 729 730 $('.rt-isotope-tab a').on('click',function(){ 731 var $parent = $(this).closest('.rt-isotope-wrapper'), 732 selector = $(this).attr('data-filter'); 733 734 $parent.find('.rt-isotope-tab .current').removeClass('current'); 735 $(this).addClass('current'); 736 $parent.find('.rt-isotope-content').isotope({ 737 filter: selector, 738 animationOptions: { 739 duration: 750, 740 easing: 'linear', 741 queue: false 742 } 743 }); 744 return false; 745 }); 746 }*/ 747} 748 749function rdtheme_wc_scripts($){ 750 /* Shop change view */ 751 $('#shop-view-mode li a').on('click',function(){ 752 $('body').removeClass('product-grid-view').removeClass('product-list-view'); 753 754 if ( $(this).closest('li').hasClass('list-view-nav')) { 755 $('body').addClass('product-list-view'); 756 Cookies.set('shopview', 'list'); 757 } 758 else{ 759 $('body').addClass('product-grid-view'); 760 Cookies.remove('shopview'); 761 } 762 return false; 763 }); 764 765 766} 767 768function rdtheme_slider_fullscreen(){ 769 var $ = jQuery; 770 $('.rt-el-slider').each(function() { 771 var width = $(window).width(), 772 left = $(this).offset().left, 773 $container = $(this).find('.rt-nivoslider'); 774 if (width<1921) { 775 $container.css('margin-left', -left).width(width); 776 } 777 else { 778 leftAlt = left-(width-1920)/2; 779 $container.css('margin-left', -leftAlt).width(1920); 780 } 781 $container.css('opacity', 1); 782 }); 783} 784 785 786function rdtheme_imgslider_scripts($){ 787 var $ = jQuery; 788 789 if ($('.rt-thumbnails-owl-carousel').length) { 790 791 792 if(!$.fn.owlCarousel){ 793 return; 794 } 795 796 var thumbnail_owl_carousel = jQuery(".thumbnails-owl-carousel"); 797 798 var rtltrue = false; 799 if ( medilinkObj.rtl == 'yes' ) { 800 rtltrue = true; 801 } 802 if (thumbnail_owl_carousel) { 803 thumbnail_owl_carousel.owlCarousel({ 804 items: 1, 805 rtl:rtltrue 806 }); 807 } 808 809 810 // 1) ASSIGN EACH 'DOT' A NUMBER 811 dotcount = 1; 812 jQuery('.thumbnails-owl-carousel .owl-dot').each(function() { 813 jQuery( this ).addClass( 'dotnumber' + dotcount); 814 jQuery( this ).attr('data-info', dotcount); 815 dotcount=dotcount+1; 816 }); 817 818 // 2) ASSIGN EACH 'SLIDE' A NUMBER 819 slidecount = 1; 820 821 jQuery('.thumbnails-owl-carousel .owl-item').not('.cloned').each(function() { 822 jQuery( this ).addClass( 'slidenumber' + slidecount); 823 slidecount=slidecount+1; 824 }); 825 826 // SYNC THE SLIDE NUMBER IMG TO ITS DOT COUNTERPART (E.G SLIDE 1 IMG TO DOT 1 BACKGROUND-IMAGE) 827 jQuery('.thumbnails-owl-carousel .owl-dot').each(function() { 828 829 grab = jQuery(this).data('info'); 830 831 slidegrab = jQuery('.slidenumber'+ grab +' img').attr('src'); 832 console.log(slidegrab); 833 834 jQuery(this).css("background-image", "url("+slidegrab+")"); 835 836 }); 837 838 // THIS FINAL BIT CAN BE REMOVED AND OVERRIDEN WITH YOUR OWN CSS OR FUNCTION, I JUST HAVE IT 839 // TO MAKE IT ALL NEAT 840 amount = jQuery('.thumbnails-owl-carousel .owl-dot').length; 841 gotowidth = 100/amount; 842 843 jQuery('.thumbnails-owl-carousel .owl-dot').css("width", gotowidth+"%"); 844 newwidth = jQuery('.thumbnails-owl-carousel .owl-dot').width(); 845 jQuery('.thumbnails-owl-carousel .owl-dot').css("height", newwidth+"px"); 846 847 848 } 849}
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.