1/* 2Name: Photography 3Written by: Okler Themes - (http://www.okler.net) 4Theme Version: 12.0.0 5*/ 6 7// Disable Scroll to Top 8theme.PluginScrollToTop.initialize = () => {}; 9 10(($ => { 11 // Slider Options 12 const sliderOptions = { 13 sliderType: 'standard', 14 sliderLayout: 'fullscreen', 15 fullScreenOffsetContainer: '#header', 16 delay: 5000, 17 disableProgressBar: 'on', 18 gridwidth: 1170, 19 gridheight: 500, 20 lazyType: "none", 21 shadow: 0, 22 spinner: "off", 23 shuffle: "off", 24 autoHeight: "off", 25 fullScreenAlignForce: "off", 26 fullScreenOffset: "", 27 hideThumbsOnMobile: "off", 28 hideSliderAtLimit: 0, 29 hideCaptionAtLimit: 0, 30 hideAllCaptionAtLilmit: 0, 31 debugMode: false, 32 fallbacks: { 33 simplifyAll: "off", 34 nextSlideOnWindowFocus: "off", 35 disableFocusListener: false, 36 }, 37 navigation: { 38 keyboardNavigation: "on", 39 keyboard_direction: "horizontal", 40 mouseScrollNavigation: "on", 41 onHoverStop: "off", 42 touch: { 43 touchenabled: "on", 44 swipe_threshold: 75, 45 swipe_min_touches: 1, 46 swipe_direction: "horizontal", 47 drag_block_vertical: false 48 }, 49 arrows: { 50 enable: true, 51 style: "arrows-portfolio-detail-1", 52 left : { 53 container:"slider", 54 h_align:"left", 55 v_align:"center", 56 h_offset:0, 57 v_offset:0, 58 }, 59 right : { 60 v_align:"center", 61 container:"slider", 62 h_align:"right", 63 h_offset:0, 64 v_offset:0 65 } 66 } 67 }, 68 parallax:{ 69 type:"on", 70 levels:[20,40,60,80,100], 71 origo:"enterpoint", 72 speed:400, 73 bgparallax:"on", 74 disable_onmobile:"off" 75 } 76 }; 77 78 if( $('.photography-demo-3').get(0) ) { 79 sliderOptions.fullScreenOffsetContainer = null; 80 sliderOptions.navigation.arrows.style = 'arrows-side-header-1'; 81 sliderOptions.navigation.arrows.hide_onleave = false; 82 83 if( $(window).width() < 992 ) { 84 sliderOptions.fullScreenOffsetContainer = '#header'; 85 } 86 } 87 88 if( $('.photography-demo-2').get(0) ) { 89 sliderOptions.fullScreenOffsetContainer = null; 90 sliderOptions.navigation.arrows.style = 'arrows-transparent-header-photography-1'; 91 sliderOptions.navigation.arrows.hide_onleave = false; 92 sliderOptions.navigation.arrows.left.h_offset = 20; 93 sliderOptions.navigation.arrows.right.h_offset = 20; 94 } 95 96 if( $('.rev_about_us').get(0) ) { 97 sliderOptions.navigation.mouseScrollNavigation = false; 98 } 99 100 // Slider Init 101 $(window).on('load', () => { 102 $('#revolutionSlider').revolution(sliderOptions); 103 }); 104 105 /* 106 Custom Portfolio Details Load More 107 */ 108 const portfolioDetailLoadMore = { 109 110 pages: 0, 111 currentPage: 0, 112 $wrapper: $('#portfolioDetailLoadMoreWrapper'), 113 $btn: $('#portfolioDetailLoadMore'), 114 $btnWrapper: $('#portfolioDetailLoadMoreBtnWrapper'), 115 $loader: $('#portfolioDetailLoadMoreLoader'), 116 117 build() { 118 119 const self = this; 120 121 self.pages = self.$wrapper.data('total-pages'); 122 123 if(self.pages <= 1) { 124 125 self.$btnWrapper.remove(); 126 return; 127 128 } else { 129 130 // init isotope 131 self.$wrapper.isotope(); 132 133 self.$btn.on('click', () => { 134 self.loadMore(); 135 }); 136 137 // Lazy Load 138 if(self.$btn.hasClass('btn-portfolioDetail-lazy-load')) { 139 theme.fn.intObs( '#portfolioDetailLoadMore', "$('#portfolioDetailLoadMore').trigger('click');", { 140 rootMargin: '0px 0px 0px 0px' 141 } ); 142 } 143 144 } 145 146 }, 147 loadMore() { 148 149 const self = this; 150 151 self.$btn.hide(); 152 self.$loader.show(); 153 154 // Ajax 155 $.ajax({ 156 url: 'ajax/demo-photography-portfolio-ajax-on-page-load-more.html', 157 complete({responseText}) { 158 159 const $items = $(responseText); 160 161 setTimeout(() => { 162 163 self.$wrapper.append($items) 164 165 self.$wrapper.isotope('appended', $items); 166 167 self.$wrapper.isotope('layout'); 168 169 self.currentPage++; 170 171 if(self.currentPage < self.pages) { 172 self.$btn.show().blur(); 173 } else { 174 self.$btnWrapper.remove(); 175 } 176 177 self.$wrapper.on( 'layoutComplete', laidOutItems => { 178 179 // Carousel 180 $(() => { 181 $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').each(function() { 182 const $this = $(this); 183 let opts; 184 185 const pluginOptions = theme.fn.getOptions($this.data('plugin-options')); 186 if (pluginOptions) 187 opts = pluginOptions; 188 189 $this.themePluginCarousel(opts); 190 setTimeout(() => { 191 $this.owlCarousel('refresh'); 192 }, 1); 193 }); 194 });
195 196 }); 197 198 // Ajax On Page 199 ajaxOnPagePortfolioDetails.build(); 200 201 self.$loader.hide(); 202 203 // Refresh Parallax 204 $(window).trigger('scroll'); 205 206 }, 1000); 207 208 } 209 }); 210 211 } 212 213 }; 214 215 if($('#portfolioDetailLoadMoreWrapper').get(0)) { 216 portfolioDetailLoadMore.build(); 217 } 218 219 /* 220 Custom Portfolio Infinite Scroll 221 */ 222 const portfolioInfiniteScroll = { 223 224 pages: 0, 225 currentPage: 0, 226 $wrapper: $('.portfolioInfiniteScrollWrapper'), 227 $btn: $('#portfolioInfiniteScrollLoadMore'), 228 $btnWrapper: $('#portfolioInfiniteScrollLoadMoreBtnWrapper'), 229 $loader: $('#portfolioInfiniteScrollLoadMoreLoader'), 230 231 build() { 232 233 const self = this; 234 235 self.pages = self.$wrapper.data('total-pages'); 236 237 if(self.pages <= 1) { 238 239 self.$btnWrapper.remove(); 240 return; 241 242 } else { 243 244 // init isotope 245 self.$wrapper.isotope(); 246 247 self.$btn.on('click', () => { 248 self.loadMore(); 249 }); 250 251 // Lazy Load 252 if(self.$btn.hasClass('btn-portfolioInfiniteScroll-lazy-load')) { 253 theme.fn.intObs( '#portfolioInfiniteScrollLoadMore', "$('#portfolioInfiniteScrollLoadMore').trigger('click');", { 254 rootMargin: '0px 0px 0px 0px' 255 }, true ); 256 } 257 258 } 259 260 }, 261 loadMore() { 262 263 const self = this; 264 265 self.$btn.hide(); 266 self.$loader.show(); 267 268 // Ajax 269 $.ajax({ 270 url: 'ajax/demo-photography-portfolio-infinite-scroll-load-more.html', 271 complete({responseText}) { 272 273 const $items = $(responseText); 274 275 setTimeout(() => { 276 277 self.$wrapper.append($items) 278 279 self.$wrapper.isotope('appended', $items); 280 281 self.$wrapper.isotope('layout'); 282 283 self.currentPage++; 284 285 if(self.currentPage < self.pages) { 286 self.$btn.show().blur(); 287 } else { 288 self.$btnWrapper.remove(); 289 } 290 291 self.$wrapper.on( 'layoutComplete', laidOutItems => { 292 // Add new items to gallery 293 self.$wrapper.find('.item-appended').each(function(){ 294 const imgsrc = $(this).find('.thumb-info-background').attr('data-src'), imgThumbsrc = $(this).find('.thumb-info-background').attr('data-thumb-src'), clone = $('#thumbGalleryDetail .owl-item > div').first().clone(), cloneThumb = $('#thumbGalleryThumbs .owl-item > div').first().clone(); 295 296 // Create images 297 clone.find('img').attr('src',imgsrc); 298 cloneThumb.find('img').attr('src',imgThumbsrc); 299 300 // Add images 301 $('#thumbGalleryDetail').owlCarousel().trigger('add.owl.carousel', [clone]); 302 $('#thumbGalleryThumbs').owlCarousel().trigger('add.owl.carousel', [cloneThumb]); 303 304 $(this).removeClass('item-appended'); 305 }); 306 307 // Carousel 308 $(() => { 309 $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').each(function() { 310 const $this = $(this); 311 let opts; 312 313 const pluginOptions = theme.fn.getOptions($this.data('plugin-options')); 314 if (pluginOptions) 315 opts = pluginOptions; 316 317 $this.themePluginCarousel(opts); 318 setTimeout(() => { 319 $this.owlCarousel('refresh'); 320 }, 1); 321 }); 322 }); 323 324 // Lightbox - Clicked Item 325 $('a[href="#photographyLightbox"]').on('click', function(){ 326 if($('.grid-sizer').get(0)) { 327 clickedItem = $(this).parent().parent().index() - 1; 328 } else { 329 clickedItem = $(this).parent().parent().index(); 330 } 331 }); 332 333 // Lightbox 334 $('.popup-with-move-anim').magnificPopup(portfolioLightboxOptions); 335 336 }); 337 338 339 340 self.$loader.hide(); 341 342 // Refresh Parallax 343 $(window).trigger('scroll'); 344 345 }, 1000); 346 347 } 348 }); 349 350 } 351 352 }; 353 354 if($('.portfolioInfiniteScrollWrapper').get(0)) { 355 portfolioInfiniteScroll.build(); 356 } 357 358 /* 359 * Ajax on Page 360 */ 361 var ajaxOnPagePortfolioDetails = { 362 363 pages: [], 364 $ajaxBox: $('#porfolioDetailsAjaxBox'), 365 $ajaxBoxContent: $('#porfolioDetailsAjaxBoxContent'), 366 367 build() { 368 369 const self = this; 370 371 $('a[data-ajax-on-page]').each(function() { 372 self.add($(this)); 373 }); 374 375 $(document).on('mousedown', 'a[data-ajax-on-page]', ev => { 376 if (ev.which == 2) { 377 ev.preventDefault(); 378 return false; 379 } 380 }); 381 382 }, 383 384 add($el) { 385 386 const self = this, href = $el.attr('data-href'); 387 388 self.pages.push(href); 389 390 $el.on('click', e => { 391 e.preventDefault(); 392 self.show(self.pages.indexOf(href)); 393 }); 394 395 }, 396 397 events() { 398 399 const self = this; 400 401 // Slider 402 sliderOptions.navigation.mouseScrollNavigation = false; 403 $('#revolutionSlider').revolution(sliderOptions); 404 405 // Carousel 406 if ($.isFunction($.fn['themePluginCarousel'])) { 407 408 $(() => { 409 $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').each(function() { 410 const $this = $(this); 411 let opts; 412 413 const pluginOptions = theme.fn.getOptions($this.data('plugin-options')); 414 if (pluginOptions) 415 opts = pluginOptions; 416 417 $this.themePluginCarousel(opts); 418 }); 419 }); 420 421 } 422 423 }, 424 425 show(i) { 426 427 const self = this; 428 429 self.$ajaxBoxContent.empty(); 430 self.$ajaxBox.removeClass('ajax-box-init').addClass('ajax-box-loading'); 431 432 $('html, body').animate({ 433 scrollTop: self.$ajaxBox.offset().top - 100 434 }, 300, 'easeOutQuad'); 435 436 // Ajax 437 $.ajax({
438 url: self.pages[i], 439 complete({responseText}) { 440 441 setTimeout(() => { 442 443 self.$ajaxBoxContent.html(responseText); 444 self.$ajaxBox.removeClass('ajax-box-loading'); 445 446 self.events(); 447 448 }, 1000); 449 450 } 451 }); 452 453 } 454 455 } 456 457 if($('#porfolioDetailsAjaxBox').get(0)) { 458 ajaxOnPagePortfolioDetails.build(); 459 } 460 461 /* 462 * Portfolio Grid - Init isotope 463 */ 464 $(window).on('load', () => { 465 const $portfolioGrid = $('#portfolioGrid'), $ourBlog = $('#ourBlog'), gridSizer = $portfolioGrid.attr('data-grid-sizer'); 466 467 // Portfolio Grid 468 if( $portfolioGrid.get(0) ) { 469 $portfolioGrid.isotope({ 470 itemSelector: '.isotope-item', 471 masonry: { 472 columnWidth: gridSizer, 473 gutter: 0 474 } 475 }); 476 477 $portfolioGrid.isotope('layout'); 478 } 479 480 if( $ourBlog.get(0) ) { 481 $ourBlog.isotope({ 482 itemSelector: '.isotope-item', 483 masonry: { 484 gutter: 0 485 } 486 }); 487 488 $ourBlog.isotope('layout'); 489 } 490 }); 491 492 /* 493 * Horizontal Scroll 494 */ 495 const $horizontalScroll = { 496 $horizontalScrollWrapper : $('#horizontalScrollBox'), 497 $horizontalScrollContent : $('#horizontalScrollBox .content'), 498 $horizontalScrollItem : $('#horizontalScrollBox .content .horizontal-scroll-item-wrapper'), 499 500 build() { 501 const self = this; 502 503 self.setContentWidth(); 504 self.buttonNavigation(); 505 self.disableEnableButtons(); 506 }, 507 setContentWidth() { 508 const self = this; 509 let totalWidth = 0; 510 511 $(self.$horizontalScrollItem).each(function(e){ 512 const boxImageWidth = $(this).outerWidth(true); 513 514 totalWidth = (totalWidth + boxImageWidth); 515 }); 516 517 self.$horizontalScrollContent.width( totalWidth ); 518 }, 519 isElementInView(element, fullyInView) { 520 const pageLeft = $(window).scrollLeft(), pageRight = pageLeft + $(window).width(), elementLeft = $(element).offset().left, elementRight = elementLeft + $(element).width(); 521 522 if (fullyInView === true) { 523 return ((pageLeft < elementLeft) && (pageRight > elementRight)); 524 } else { 525 return ((elementLeft <= pageRight) && (elementRight >= pageLeft)); 526 } 527 }, 528 buttonNavigation() { 529 const self = this; 530 const nextButton = self.$horizontalScrollWrapper.find('.custom-portfolio-navigation .next'); 531 const prevButton = self.$horizontalScrollWrapper.find('.custom-portfolio-navigation .prev'); 532 const totalItems = self.$horizontalScrollItem.length - 1; 533 let screen = 0; 534 let distance = 0; 535 let index = 0; 536 let flag = false; 537 let atualItem; 538 539 prevButton.on('click', () => { 540 if( !flag ){ 541 flag = true; 542 543 if( index > 0 ) { 544 index--; 545 } 546 atualItem = self.$horizontalScrollItem.eq(index); 547 548 // Check if Element in View 549 const isElementInView = self.isElementInView(atualItem, false); 550 if( !isElementInView ) { 551 self.$horizontalScrollItem.each(function(){ 552 const inView = self.isElementInView($(this), false); 553 554 if( inView ) { 555 atualItem = $(this); 556 return false; 557 } 558 }); 559 } 560 561 // If Demo 3 562 if($('.photography-demo-3').get(0)) { 563 screen = (($(window).width() - 255 ) - atualItem.outerWidth(true)) / 2; 564 } else { 565 screen = ($(window).width() - atualItem.outerWidth(true)) / 2; 566 } 567 568 distance = (atualItem.position().left - screen); 569 570 $('#horizontalScrollBox').animate({ scrollLeft: distance }, 300, () => { 571 flag = false; 572 }); 573 } 574 }); 575 576 nextButton.on('click', () => { 577 if( !flag ){ 578 flag = true; 579 580 if( index < totalItems ) { 581 index++; 582 } 583 atualItem = self.$horizontalScrollItem.eq(index); 584 585 // Check if Element in View 586 const isElementInView = self.isElementInView(atualItem, false); 587 if( !isElementInView ) { 588 self.$horizontalScrollItem.each(function(){ 589 const inView = self.isElementInView($(this), false); 590 591 if( inView ) { 592 atualItem = $(this); 593 index = $(this).index(); 594 return false; 595 } 596 });
597 } 598 599 // If Demo 3 600 if($('.photography-demo-3').get(0)) { 601 screen = (($(window).width() - 255 ) - atualItem.outerWidth(true)) / 2; 602 } else { 603 screen = ($(window).width() - atualItem.outerWidth(true)) / 2; 604 } 605 606 distance = (atualItem.position().left - screen); 607 608 $('#horizontalScrollBox').animate({ scrollLeft: distance }, 300, () => { 609 flag = false; 610 }); 611 } 612 }); 613 }, 614 disableEnableButtons() { 615 const self = this, nextButton = self.$horizontalScrollWrapper.find('.custom-portfolio-navigation .next'), prevButton = self.$horizontalScrollWrapper.find('.custom-portfolio-navigation .prev'); 616 617 self.$horizontalScrollWrapper.on('scroll', function(){ 618 if( $(this).scrollLeft() == 0 ) { 619 prevButton.addClass('disable-button'); 620 } else { 621 prevButton.removeClass('disable-button'); 622 } 623 624 if( $(this).scrollLeft() > ((self.$horizontalScrollContent.width() - $(window).width()) - 1) ) { 625 nextButton.addClass('disable-button'); 626 } else { 627 nextButton.removeClass('disable-button'); 628 } 629 }); 630 } 631 }; 632 633 if($('#horizontalScrollBox').get(0)) { 634 $horizontalScroll.build(); 635 636 $(window).trigger('resize'); 637 638 const $window = $(window); 639 640 // Mousewheel horizontal scroll 641 $('#horizontalScrollBox').mousewheel(function(event, delta) { 642 if ($window.width() > 991) { 643 this.scrollLeft -= (delta * 60); 644 event.preventDefault(); 645 } 646 }); 647 648 // Build $horizontalScroll on resize 649 $window.on('load', () => { 650 $(document).ready(() => { 651 $(window).afterResize(() => { 652 $horizontalScroll.setContentWidth(); 653 654 if($('.photography-demo-2').get(0)) { 655 $(".thumb-info-wrapper img").css('transition','ease all 5s'); 656 $(".thumb-info-wrapper img").on("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", e => { 657 $horizontalScroll.setContentWidth(); 658 }); 659 } 660 }); 661 662 if($('.photography-demo-2').get(0)) { 663 $(window).on('resize', () => { 664 $(".thumb-info-wrapper img").css('transition','none'); 665 }); 666 } 667 668 $(window).trigger('resize'); 669 }); 670 }); 671 } 672 673 /* 674 * Lightbox 675 */ 676 var clickedItem; 677 678 let removeShowThumbsTimeout; 679 680 var portfolioLightboxOptions = { 681 type: 'inline', 682 683 fixedContentPos: true, 684 fixedBgPos: true, 685 686 overflowY: 'hidden', 687 688 closeBtnInside: true, 689 preloader: false, 690 691 midClick: true, 692 removalDelay: 300, 693 mainClass: 'photography-portfolio-gallery', 694 695 callbacks: { 696 open() { 697 $('#thumbGalleryDetail').owlCarousel().trigger('refresh.owl.carousel'); 698 $('#thumbGalleryDetail').owlCarousel().trigger('to.owl.carousel', [clickedItem, 0]); 699 700 $('#thumbGalleryThumbs').owlCarousel('refresh'); 701 702 removeShowThumbsTimeout = setTimeout(() => { 703 $('#thumbGalleryThumbs').removeClass('show-thumbs'); 704 }, 3000); 705 706 $(document).on('keydown', ({keyCode}) => { 707 if(keyCode == 37) { 708 $('#thumbGalleryDetail').trigger('prev.owl') 709 } 710 if(keyCode == 39) { 711 $('#thumbGalleryDetail').trigger('next.owl') 712 } 713 }); 714 715 716 }, 717 close() { 718 clearTimeout(removeShowThumbsTimeout); 719 $('#thumbGalleryThumbs').addClass('show-thumbs'); 720 $(document).off('keydown'); 721 } 722 } 723}; 724 725 if($('a[href="#photographyLightbox"]').get(0)) { 726 $('a[href="#photographyLightbox"]').on('click', function(){ 727 if($('.grid-sizer').get(0)) { 728 clickedItem = $(this).parent().parent().index() - 1; 729 } else { 730 clickedItem = $(this).parent().parent().index(); 731 } 732 }); 733 734 $('a[href="#photographyLightbox"]').magnificPopup(portfolioLightboxOptions); 735 } 736 737 /* 738 Thumb Gallery 739 */ 740 if( $('#photographyLightbox').get(0) ) { 741 var $thumbGalleryDetail = $('#thumbGalleryDetail'), 742 $thumbGalleryThumbs = $('#thumbGalleryThumbs'), 743 flag = false, 744 duration = 300; 745 746 $thumbGalleryDetail 747 .owlCarousel({ 748 items: 1, 749 margin: 10, 750 nav: true, 751 dots: false, 752 loop: false, 753 navText: [], 754 rtl: (($('html[dir="rtl"]').get(0)) ? true : false), 755 onRefreshed(e) { 756 setTimeout(() => { 757 $('.mfp-wrap.photography-portfolio-gallery').css('opacity',1); 758 }, 300); 759 } 760 }) 761 .on('changed.owl.carousel', ({item}) => { 762 if (!flag) { 763 flag = true; 764 $thumbGalleryThumbs.trigger('to.owl.carousel', [item.index-1, duration, true]); 765 766 // add class to active thumb 767 $thumbGalleryThumbs.find('.owl-item').removeClass('active-thumb'); 768 $thumbGalleryThumbs.find('.owl-item:eq('+ item.index +')').addClass('active-thumb'); 769 770 flag = false; 771 } 772 }); 773 774 $thumbGalleryThumbs 775 .owlCarousel({ 776 margin: 15, 777 items: 15, 778 nav: false, 779 center: false, 780 dots: false, 781 pagination: false, 782 rtl: (($('html[dir="rtl"]').get(0)) ? true : false) 783 }) 784 .on('click', '.owl-item', function() { 785 $thumbGalleryDetail.trigger('to.owl.carousel', [$(this).index(), duration, true]); 786 787 // add class to active thumb 788 $thumbGalleryThumbs.find('.owl-item').removeClass('active-thumb'); 789 $(this).addClass('active-thumb'); 790 }); 791 792 // Set first item with active-thumb 793 $thumbGalleryThumbs.find('.owl-item:eq(0)').addClass('active-thumb'); 794 795 } 796 797 if( $('#portfolioSliderWithThumbs').get(0) ) { 798 var $thumbGalleryDetail = $('#thumbGalleryDetail'), 799 $thumbGalleryThumbs = $('#thumbGalleryThumbs'), 800 flag = false, 801 duration = 300; 802 803 $thumbGalleryDetail 804 .owlCarousel({ 805 items: 1, 806 margin: 10, 807 nav: true, 808 dots: false, 809 loop: false, 810 navText: [], 811 rtl: (($('html[dir="rtl"]').get(0)) ? true : false), 812 onRefreshed(e) { 813 setTimeout(() => { 814 $('.mfp-wrap.photography-portfolio-gallery').css('opacity',1); 815 }, 300); 816 } 817 }) 818 .on('changed.owl.carousel', ({item}) => { 819 if (!flag) { 820 flag = true; 821 $thumbGalleryThumbs.trigger('to.owl.carousel', [item.index-1, duration, true]); 822 823 // add class to active thumb 824 $thumbGalleryThumbs.find('.owl-item').removeClass('active-thumb'); 825 $thumbGalleryThumbs.find('.owl-item:eq('+ item.index +')').addClass('active-thumb'); 826 827 flag = false; 828 } 829 }); 830 831 $thumbGalleryThumbs 832 .owlCarousel({ 833 margin: 15, 834 items: 8, 835 nav: false, 836 center: false, 837 dots: false, 838 pagination: false, 839 rtl: (($('html[dir="rtl"]').get(0)) ? true : false), 840 responsive:{ 841 0:{ 842 items:2 843 }, 844 300:{
845 items:3 846 }, 847 767:{ 848 items:6, 849 }, 850 991:{ 851 items:7, 852 }, 853 1200:{ 854 items:8, 855 } 856 } 857 }) 858 .on('click', '.owl-item', function() { 859 $thumbGalleryDetail.trigger('to.owl.carousel', [$(this).index(), duration, true]); 860 861 // add class to active thumb 862 $thumbGalleryThumbs.find('.owl-item').removeClass('active-thumb'); 863 $(this).addClass('active-thumb'); 864 }); 865 866 // Set first item with active-thumb 867 $thumbGalleryThumbs.find('.owl-item:eq(0)').addClass('active-thumb'); 868 869 $(document).on('keydown', ({keyCode}) => { 870 if(keyCode == 37) { 871 $('#thumbGalleryDetail').trigger('prev.owl') 872 } 873 if(keyCode == 39) { 874 $('#thumbGalleryDetail').trigger('next.owl') 875 } 876 }); 877 878 } 879})).apply(this, [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.