1/************************************************************************* 2 Template Name: Qamous 3 Template URI: https://themeforest.net/qamous-html/ 4 Description: Qamous is a fully functional HtML theplate that gives you freedom to create any type of directory listing theme with tons of real time functionality for your real site. We did not make it just to present the demo, but to present each and every functionality from a real user's point of view. 5 Author: Radiuzz 6 Version: 1.0 7 Author URI: https://themeforest.net/user/radiuzz 8 9 Note: style js. 10*************************************************************************/ 11/* 12 13 ## Scroll top 14 ## Mobile Menu 15 ## Sticky Header 16 ## All Scroll Bar 17 ## Parallax Background 18 ## Sticky Sidebar 19 ## Count Down 20 ## Mega Menu Carousel 21 ## Featured Location Slider 22 ## Client Review Carousel 23 ## Brands Carousel 24 ## Features Cat Carousel 25 ## Todo Items Carousel 26 ## Listing Todo Single 27 ## Masonry 28 ## Review Rating 29 ## Single Product 30 ## Listing Gallery 31 ## spinner 32 ## Youtube video trigger 33 ## Testimonail 34 ## Price Distance Range 35 ## Mega Menu Carousel 36 ## Add Listing Tab 37 ## Counter 38 39================================================== 40[ End table content ] 41==================================================*/ 42 43 44(function($) { 45 'use strict'; 46 47 var qamousApp = { 48 /* --------------------------------------------- 49 ## Scroll top 50 --------------------------------------------- */ 51 scroll_top: function () { 52 $("body").append("<a href='#top' id='scroll-top' class='topbutton btn-hide'><span class='fa fa-angle-double-up'></span></a>"); 53 var $scrolltop = $('#scroll-top'); 54 $(window).on('scroll', function () { 55 if ($(this).scrollTop() > $(this).height()) { 56 $scrolltop 57 .addClass('btn-show') 58 .removeClass('btn-hide'); 59 } else { 60 $scrolltop 61 .addClass('btn-hide') 62 .removeClass('btn-show'); 63 } 64 }); 65 $("a[href='#top']").on('click', function () { 66 $("html, body").animate({ 67 scrollTop: 0 68 }, "normal"); 69 return false; 70 }); 71 72 $('.btn-register-now').on('click', function () { 73 $('.user-signin-area').addClass('hidden'); 74 $('.user-signup-area').addClass('show'); 75 }); 76 }, 77 78 /* --------------------------------------------- 79 ## Mobile Menu 80 --------------------------------------------- */ 81 mobile_menu: function () { 82 var mobilesearch = $('.site-header .navigation-area .header-navigation-right').clone().appendTo('.mobile-menu'); 83 84 $('.dashborad-menu-area > .btn-close').on('click', function () { 85 $('.dashborad-menu-area').toggleClass('active'); 86 }); 87 // mobile Menu 88 //------------------------------- 89 $('.site-navigation .mainmenu-area nav').meanmenu({ 90 meanMenuClose: "<i class='fa fa-close'></i>", 91 meanMenuCloseSize: '18px', 92 meanScreenWidth: '320', 93 meanExpandableChildren: true, 94 meanMenuContainer: '.mobile-menu' 95 }); 96 }, 97 98 /*------------------------------------------- 99 ## Sticky Header 100 --------------------------------------------- */ 101 sticky_header: function() { 102 if ($('#sticky-header').length) { 103 var stickyMenu = $('.site-header').clone().appendTo('#sticky-header'); 104 $(window).on('scroll', function() { 105 var w = $(window).width(); 106 if (w > 320) { 107 if ($(this).scrollTop() > 550) { 108 $('#sticky-header').slideDown(550); 109 } else { 110 $('#sticky-header').slideUp(550); 111 } 112 } 113 }); 114 } 115 }, 116 117 /*------------------------------------------- 118 ## All Scroll Bar 119 --------------------------------------------- */ 120 scroll_bar: function() { 121 // qamous Sidebar Scroll 122 //------------------------------- 123 if ($('.listing-todo-main').length) { 124 var $sidebar_scroll = $('.listing-todo-main'); 125 $sidebar_scroll.TrackpadScrollEmulator(); 126 $( window ).resize(function() { 127 setTimeout(function() { 128 $sidebar_scroll.TrackpadScrollEmulator('recalculate'); 129 }, 150); 130 }); 131 } 132 // dashboard Menu Scroll 133 //------------------------------- 134 if ($('.dashborad-menu-main').length) { 135 var $sidebar_scroll = $('.dashborad-menu-main'); 136 $sidebar_scroll.TrackpadScrollEmulator(); 137 $( window ).resize(function() { 138 setTimeout(function() { 139 $sidebar_scroll.TrackpadScrollEmulator('recalculate'); 140 }, 250); 141 }); 142 } 143 }, 144 /*------------------------------------------- 145 ## Nice select And Data Picker 146 --------------------------------------------- */ 147 nice_select_data_picker: function () { 148 if ($('select').length) { 149 $('select').niceSelect(); 150 } 151 152 if ($('#res_date').length) { 153 $('#res_date').datetimepicker(); 154 } 155 }, 156 157 /*-------------------------------------------
158 ## Parallax Background 159 --------------------------------------------- */ 160 bg_parallax: function () { 161 if ($('.bg-parallax').length) { 162 $('.bg-parallax').parallax("35%", -0.25); 163 } 164 }, 165 166 167 /*------------------------------------------- 168 ## Sticky Sidebar 169 --------------------------------------------- */ 170 sticky_sidebar: function() { 171 if ($('.sidebar.sidebar-one').length) { 172 $('.sidebar.sidebar-one').theiaStickySidebar({ 173 'containerSelector': '#main-wrapper', 174 'additionalMarginTop':32, 175 'minWidth': 992, 176 }); 177 } 178 if ($('.sidebar.sidebar-two').length) { 179 $('.sidebar.sidebar-two').theiaStickySidebar({ 180 'containerSelector': '#listing_list', 181 'additionalMarginTop': 260, 182 'minWidth': 992, 183 }); 184 } 185 }, 186 187 /* --------------------------------------------- 188 ## Count Down 189 --------------------------------------------- */ 190 count_down: function() { 191 if ($('.countdown').length) { 192 $('.countdown').final_countdown({ 193 start: '1362139200', 194 end: '1409961320', 195 now: '1387991319', 196 seconds: { 197 borderColor: '#A02D50', 198 borderWidth: '2' 199 }, 200 minutes: { 201 borderColor: '#A02D50', 202 borderWidth: '2' 203 }, 204 hours: { 205 borderColor: '#A02D50', 206 borderWidth: '2' 207 }, 208 days: { 209 borderColor: '#A02D50', 210 borderWidth: '2' 211 } 212 }); 213 } 214 }, 215 216 217 /*------------------------------------------- 218 ## Featured Location Slider 219 --------------------------------------------- */ 220 featured_location_slider: function() { 221 if ($('.featured-location-carousel.style-one').length) { 222 $('.featured-location-carousel.style-one').owlCarousel({ 223 center: false, 224 //rtl:true, 225 items: 4, 226 autoplay: true, 227 autoplayTimeout: 7000, 228 //smartSpeed: 2600, 229 scrollingSpeed: 400, 230 loop: true, 231 margin: 10, 232 singleItem : true, 233 dots: true, 234 nav: true, 235 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 236 responsive: { 237 280: { 238 items: 2, 239 margin: 5, 240 nav: true, 241 }, 242 768: { 243 items: 2 244 }, 245 992: { 246 items: 3 247 }, 248 1200: { 249 items: 4 250 }, 251 1400: { 252 items: 4 253 } 254 } 255 }); 256 } 257 if ($('.featured-location-carousel.style-two').length) { 258 $('.featured-location-carousel.style-two').owlCarousel({ 259 center: false, 260 items: 3, 261 //rtl:true, 262 autoplay: true, 263 scrollingSpeed: 400, 264 autoplayTimeout: 2000, 265 //smartSpeed: 2600, 266 loop: true, 267 margin: 15, 268 singleItem : true, 269 dots: false, 270 nav: true, 271 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 272 responsive: { 273 320: { 274 items: 1, 275 margin: 5, 276 nav: false, 277 }, 278 768: { 279 items: 2 280 }, 281 992: { 282 items: 2 283 }, 284 1200: { 285 items: 3 286 }, 287 1400: { 288 items: 3 289 } 290 } 291 }); 292 } 293 294 295 if ($('.featured-location-carousel.style-three').length) { 296 $('.featured-location-carousel.style-three').owlCarousel({ 297 center: false, 298 items: 4, 299 //rtl:true, 300 autoplay: true, 301 autoplayTimeout: 2000, 302 scrollingSpeed: 400, 303 //smartSpeed: 2600, 304 loop: true, 305 margin: 0, 306 singleItem : true, 307 dots: false, 308 nav: true, 309 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 310 responsive: { 311 320: { 312 items: 1, 313 margin: 0, 314 nav: false, 315 }, 316 768: { 317 items: 2 318 }, 319 992: { 320 items: 2 321 }, 322 1200: { 323 items: 3 324 }, 325 1400: { 326 items: 4 327 } 328 } 329 }); 330 } 331 }, 332 333 /*------------------------------------------- 334 ## Client Review Carousel 335 --------------------------------------------- */ 336 client_review_carousel: function() { 337 if ($('#client-review-carousel').length) { 338 $('#client-review-carousel').owlCarousel({ 339 center: false, 340 items: 3,
341 smartSpeed: 800, 342 autoplay: true, 343 autoplayTimeout: 5000, 344 loop: true, 345 margin: 30, 346 nav: false, 347 dots: true, 348 singleItem: false, 349 responsive: { 350 280: { 351 items: 1 352 }, 353 768: { 354 items: 2 355 }, 356 992: { 357 items: 3 358 }, 359 1200: { 360 items: 3 361 }, 362 1400: { 363 items: 3 364 } 365 } 366 }); 367 } 368 }, 369 370 /* --------------------------------------------- 371 ## Brands Carousel 372 --------------------------------------------- */ 373 brands_carousel: function() { 374 if ($('.brands-carousel').length) { 375 $('.brands-carousel').owlCarousel({ 376 center: false, 377 items: 5, 378 autoplay: true, 379 margin: 4, 380 autoWidth:true, 381 loop: true, 382 nav: false, 383 dots: false 384 385 }); 386 } 387 }, 388 389 /*------------------------------------------- 390 ## Features Cat Carousel 391 --------------------------------------------- */ 392 features_cat_carousel: function() { 393 if ($('.features-cat-carousel').length) { 394 $('.features-cat-carousel').owlCarousel({ 395 center: true, 396 items: 3, 397 autoplay: false, 398 autoplayTimeout: 3000, 399 smartSpeed: 800, 400 loop: true, 401 margin: 10, 402 singleItem : true, 403 dots: false, 404 nav: false, 405 responsive: { 406 280: { 407 items: 4 408 }, 409 520: { 410 items: 3 411 }, 412 768: { 413 items: 3 414 }, 415 992: { 416 items: 3 417 }, 418 1200: { 419 items: 5 420 } 421 } 422 }); 423 } 424 if ($('.features-cat-carousel2').length) { 425 $('.features-cat-carousel2').owlCarousel({ 426 center: false, 427 items: 6, 428 autoplay: false, 429 autoplayTimeout: 3000, 430 smartSpeed: 800, 431 loop: true, 432 margin: 10, 433 singleItem : true, 434 dots: false, 435 nav: false, 436 responsive: { 437 280: { 438 items: 1 439 }, 440 320: { 441 items: 2 442 }, 443 400: { 444 items: 3 445 }, 446 768: { 447 items: 4 448 }, 449 992: { 450 items: 5 451 }, 452 1200: { 453 items: 6 454 } 455 } 456 }); 457 } 458 }, 459 460 /*------------------------------------------- 461 ## Todo Items Carousel 462 --------------------------------------------- */ 463 todo_items_carousel: function() { 464 if ($('.todo-items-carousel').length) { 465 $('.todo-items-carousel').owlCarousel({ 466 center: false, 467 items: 5, 468 autoplay: true, 469 autoplayTimeout: 3000,
470 smartSpeed: 800, 471 loop: true, 472 margin: 10, 473 singleItem : true, 474 dots: false, 475 nav: true, 476 navText: ["<span>prev</span>", "<span>next</span>"], 477 responsive: { 478 280: { 479 items: 1 480 }, 481 575: { 482 items: 2 483 }, 484 768: { 485 items: 2 486 }, 487 992: { 488 items: 3 489 }, 490 1200: { 491 items: 4 492 }, 493 1400: { 494 items: 5 495 } 496 } 497 }); 498 } 499 500 if ($('.todo-items-carousel2').length) { 501 $('.todo-items-carousel2').owlCarousel({ 502 center: false, 503 items: 3, 504 autoplay: true, 505 autoplayTimeout: 3000, 506 smartSpeed: 800, 507 loop: true, 508 margin: 30, 509 singleItem : true, 510 dots: true, 511 nav: false, 512 responsive: { 513 280: { 514 items: 1 515 }, 516 768: { 517 items: 2 518 }, 519 992: { 520 items: 3 521 }, 522 1200: { 523 items: 3 524 }, 525 1400: { 526 items: 3 527 } 528 } 529 }); 530 } 531 }, 532 533 /*------------------------------------------- 534 ## Listing Todo Single 535 --------------------------------------------- */ 536 listing_todo_single: function() { 537 if ($('.listing-todo-feature-list.carousel-nav-dots').length) { 538 $('.listing-todo-feature-list.carousel-nav-dots').owlCarousel({ 539 center: false, 540 items: 3, 541 autoplay: true, 542 autoplayTimeout: 3000, 543 smartSpeed: 800, 544 loop: true, 545 margin: 0, 546 singleItem : true, 547 dots: true, 548 nav: false, 549 responsive: { 550 280: { 551 items: 1 552 }, 553 768: { 554 items: 2 555 }, 556 992: { 557 items: 2 558 }, 559 1200: { 560 items: 3 561 }, 562 1400: { 563 items: 3 564 } 565 } 566 }); 567 } 568 if ($('.listing-todo-thumbnail-carousel').length) { 569 $('.listing-todo-thumbnail-carousel').owlCarousel({ 570 center: false, 571 items: 3, 572 autoplay: false, 573 autoplayTimeout: 3000, 574 smartSpeed: 800, 575 loop: true, 576 margin: 0, 577 singleItem : true, 578 dots: true, 579 nav: false, 580 responsive: { 581 280: { 582 items: 1 583 }, 584 768: { 585 items: 2 586 }, 587 992: { 588 items: 2 589 }, 590 1200: { 591 items: 3 592 }, 593 1400: { 594 items: 3 595 } 596 } 597 }); 598 } 599 }, 600 601 /* --------------------------------------------- 602 ## Masonry 603 --------------------------------------------- */ 604 grid_masonry: function () { 605 var $container = $('#masonry'); 606 if ($container.length > 0) { 607 $container.imagesLoaded(function(){ 608 $container.masonry({ 609 itemSelector : '.grid-item' 610 }); 611 }); 612 } 613 }, 614 615 /* --------------------------------------------- 616 ## Review Rating 617 --------------------------------------------- */ 618 review_rating: function () { 619 if ($('.review-rating').length > 0) { 620 var options = { 621 max_value: 5, 622 step_size: 0.5, 623 } 624 $(".review-rating").rate(options); 625 } 626 }, 627 628 /* --------------------------------------------- 629 ## Single Product 630 --------------------------------------------- */ 631 single_product: function() { 632 // Init Slider 633 if ($('.product-detail-slide').length > 0) { 634 $('.product-detail-slide').owlCarousel({ 635 items: 1, 636 loop: true, 637 autoplay: true, 638 nav: false, 639 dots: false 640 }); 641 } 642 643 if ($('.product-detail-slide').length > 0) { 644 // Pref add class active to 1st thumbnail via js 645 $('.thumbnails').eq(0).addClass('active'); 646 // When slider autoplay or drag is true 647 $('.product-detail-slide').on('changed.owl.carousel', function(event) { 648 $('.thumbnails').removeClass('active'); 649 var sliders = 3; 650 var currentItem = event.item.index - 2; 651 if(currentItem >= sliders) { 652 currentItem = 0; 653 } 654 $('.thumbnails').eq(currentItem).addClass('active'); 655 }); 656 // When thumbnail is clicked 657 $('.thumbnails a').click(function(event) { 658 event.preventDefault(); 659 $('.thumbnails').removeClass('active'); 660 var index = $('.thumbnails a').index(this); 661 $('.thumbnails').eq(index).addClass('active'); 662 $('.product-detail-slide').trigger('to.owl.carousel', [index, 300, true]); 663 }); 664 } 665 }, 666 667 /* --------------------------------------------- 668 ## Listing Gallery 669 --------------------------------------------- */ 670 listing_gallery: function() { 671 // Init Slider 672 if ($('.listing-gallery-slide').length > 0) { 673 $('.listing-gallery-slide').owlCarousel({ 674 items: 1, 675 loop: true, 676 autoplay: true, 677 dots: false, 678 nav: true, 679 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 680 }); 681 } 682 683 if ($('.listing-gallery-slide').length > 0) { 684 // Pref add class active to 1st thumbnail via js 685 $('.thumbnails').eq(0).addClass('active'); 686 // When slider autoplay or drag is true 687 $('.listing-gallery-slide').on('changed.owl.carousel', function(event) { 688 $('.thumbnails').removeClass('active'); 689 var sliders = 3; 690 var currentItem = event.item.index - 2; 691 if(currentItem >= sliders) { 692 currentItem = 0; 693 } 694 $('.thumbnails').eq(currentItem).addClass('active'); 695 }); 696 // When thumbnail is clicked 697 $('.thumbnails a').click(function(event) { 698 event.preventDefault(); 699 $('.thumbnails').removeClass('active'); 700 var index = $('.thumbnails a').index(this); 701 $('.thumbnails').eq(index).addClass('active'); 702 $('.listing-gallery-slide').trigger('to.owl.carousel', [index, 300, true]); 703 }); 704 } 705 }, 706 707 /* --------------------------------------------- 708 ## spinner 709 --------------------------------------------- */ 710 input_spinner: function() { 711 var options_number = { 712 maxValue: 100, 713 minValue: 0 714 } 715 $(".input-spinner.product-no").WanSpinner(options_number); 716 $(".input-spinner.number").WanSpinner(options_number); 717 }, 718 719 /*------------------------------------------- 720 ## Youtube video trigger 721 --------------------------------------------- */ 722 youtube_video: function() { 723 if ($('.video-btn').length > 0) { 724 $('.video-btn').yu2fvl(); 725 } 726 }, 727 728 /* --------------------------------------------- 729 ## Testimonail 730 --------------------------------------------- */ 731 testimonial: function () { 732 if ($('#testimonial-carousel').length) { 733 $('#testimonial-carousel').owlCarousel({ 734 center: false, 735 items: 1, 736 margin: 0, 737 autoplay: true, 738 singleItem: true, 739 smartSpeed:500, 740 loop: true, 741 nav: false, 742 dots: true 743 }); 744 } 745 }, 746 747 /* --------------------------------------------- 748 ## Price Distance Range 749 --------------------------------------------- */ 750 price_distance_range: function () { 751 if ($('#search_distance').length > 0) { 752 var onMove = function(e, percentage) { 753 $(".distance-value").text((percentage).toFixed(0)); 754 } 755 var range = new RangeSlider($("#search_distance"), { 756 percentage: 60, 757 onMove: onMove, 758 onDown: onMove, 759 pollLimit: 100 760 }); 761 } 762 763 if ($('#search_distance2').length > 0) { 764 var onMove = function(e, percentage) { 765 $(".distance-value").text((percentage).toFixed(0)); 766 } 767 var range = new RangeSlider($("#search_distance2"), { 768 percentage: 60, 769 onMove: onMove, 770 onDown: onMove, 771 pollLimit: 100 772 }); 773 } 774 if ($('#search_price').length > 0) { 775 var onMove = function(e, percentage) { 776 $(".price-value").text((percentage/0.005).toFixed(0)); 777 } 778 var range = new RangeSlider($("#search_price"), { 779 percentage:5, 780 onMove: onMove, 781 onDown: onMove, 782 pollLimit: 100 783 }); 784 } 785 786 if ($('#search_price2').length > 0) { 787 var onMove = function(e, percentage) { 788 $(".price-value").text((percentage/0.005).toFixed(0)); 789 } 790 var range = new RangeSlider($("#search_price2"), { 791 percentage: 30, 792 onMove: onMove, 793 onDown: onMove, 794 pollLimit: 100 795 }); 796 } 797 798 if ($('#search_price3').length > 0) { 799 var onMove = function(e, percentage) { 800 $(".price-value").text((percentage/0.005).toFixed(0)); 801 } 802 var range = new RangeSlider($("#search_price3"), { 803 percentage: 30, 804 onMove: onMove, 805 onDown: onMove, 806 pollLimit: 100 807 }); 808 } 809 810 if ($('#search_price4').length > 0) { 811 var onMove = function(e, percentage) { 812 $(".price-value").text((percentage/0.005).toFixed(0)); 813 } 814 var range = new RangeSlider($("#search_price4"), { 815 percentage: 30, 816 onMove: onMove, 817 onDown: onMove, 818 pollLimit: 100 819 }); 820 } 821 }, 822 823 /*------------------------------------------- 824 ## Mega Menu Carousel 825 --------------------------------------------- */ 826 mega_menu_carousel: function() { 827 if ($('.mega-menu-content').length) { 828 $('.mega-menu-content').owlCarousel({ 829 center: false, 830 items: 5, 831 autoplay: false, 832 autoplayTimeout: 3000,
833 smartSpeed: 800, 834 loop: true, 835 margin: 30, 836 singleItem : true, 837 dots: true, 838 nav: false, 839 responsive: { 840 280: { 841 items: 1 842 }, 843 768: { 844 items: 3 845 }, 846 992: { 847 items: 3 848 }, 849 1200: { 850 items: 4 851 }, 852 1400: { 853 items: 5 854 } 855 } 856 }); 857 } 858 }, 859 860 /* --------------------------------------------- 861 ## Add Listing Tab 862 --------------------------------------------- */ 863 add_listing_tab: function() { 864 if ($('#add-listing-tab').length > 0) { 865 var frmInfo = $('#listinfo'); 866 var frmInfoValidator = frmInfo.validate(); 867 868 var frmloc = $('#listlocation'); 869 var frmlocValidator = frmloc.validate(); 870 871 var frmCat = $('#listcat'); 872 var frmCatValidator = frmCat.validate(); 873 874 $('#add-listing-tab').steps({ 875 onChange: function (currentIndex, newIndex, stepDirection) { 876 // step1 877 if (currentIndex === 0) { 878 if (stepDirection === 'forward') { 879 return frmInfo.valid(); 880 } 881 if (stepDirection === 'backward') { 882 frmInfoValidator.resetForm(); 883 } 884 } 885 // step3 886 if (currentIndex === 2) { 887 if (stepDirection === 'forward') { 888 return frmloc.valid(); 889 } 890 if (stepDirection === 'backward') { 891 frmlocValidator.resetForm(); 892 } 893 } 894 // step4 895 if (currentIndex === 3) { 896 if (stepDirection === 'forward') { 897 return frmCat.valid(); 898 } 899 if (stepDirection === 'backward') { 900 frmCatValidator.resetForm(); 901 } 902 } 903 return true; 904 }, 905 onFinish: function () { 906 alert('Wizard Completed'); 907 } 908 }); 909 } 910 }, 911 /* --------------------------------------------- 912 ## Circle Progress 913 ---------------------------------------------- */ 914 circle_progress: function() { 915 if ($('#circle').length > 0) { 916 $('#circle').circleProgress({ 917 value: 1, 918 size: 130, 919 fill: { 920 color: ["#F12C15"] 921 } 922 }); 923 } 924 if ($('#circle1').length > 0) { 925 $('#circle1').circleProgress({ 926 value: 1, 927 size: 130, 928 fill: { 929 color: ["#F12C15"] 930 } 931 }); 932 } 933 }, 934 /* --------------------------------------------- 935 ## Tags Keyword 936 ---------------------------------------------- */ 937 tag_keyword: function() { 938 if ($('#tag-keyword').length > 0) { 939 var tagInput1 = new TagsInput({ 940 selector: 'tag-keyword', 941 duplicate : false, 942 max : 8 943 }); 944 tagInput1.addData(['tags' , 'here']) 945 } 946 }, 947 948 /* --------------------------------------------- 949 ## Line Chart 950 ---------------------------------------------- */ 951 line_chart: function() { 952 if ($('#simple-line-chart').length > 0) { 953 new Chartist.Line('#simple-line-chart', { 954 labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], 955 series: [ 956 [1, 9, 7, 8, 5, 12, 5], 957 [2, 12, 9, 11, 7, 10, 3] 958 ] 959 }, { 960 fullWidth: true, 961 axisY: { 962 labelInterpolationFnc: function(value) { 963 return (value * 500); 964 } 965 }, 966 chartPadding: { 967 right: 40 968 }, 969 plugins: [ 970 Chartist.plugins.tooltip() 971 ] 972 }); 973 } 974 if ($('#simple-line-chart2').length > 0) { 975 //Simple line chart 976 new Chartist.Line('#simple-line-chart2', { 977 labels: false, 978 series: [ 979 [1, 9, 7, 8, 5, 12, 15], 980 ] 981 }, { 982 fullWidth: true, 983 chartPadding: { 984 left: -20 985 }, 986 plugins: [ 987 Chartist.plugins.tooltip() 988 ] 989 }); 990 } 991 }, 992 993 994 /* --------------------------------------------- 995 ## Counter 996 --------------------------------------------- */ 997 counter: function () { 998 if ($('#counter').length > 0) { 999 var a = 0; 1000 $(window).on('scroll', function() { 1001 var oTop = $('#counter').offset().top - window.innerHeight; 1002 if (a == 0 && $(window).scrollTop() > oTop) { 1003 $('.counter-value').each(function() { 1004 var $this = $(this), 1005 countTo = $this.attr('data-count'); 1006 $({ 1007 countNum: $this.text() 1008 }).animate({ 1009 countNum: countTo 1010 }, { 1011 duration: 2000, 1012 easing: 'swing', 1013 step: function() { 1014 $this.text(Math.floor(this.countNum)) 1015 }, 1016 complete: function() { 1017 $this.text(this.countNum) 1018 } 1019 }) 1020 }); 1021 a = 1 1022 } 1023 }) 1024 } 1025 }, 1026 1027 1028 /* --------------------------------------------- 1029 function initializ 1030 --------------------------------------------- */ 1031 initializ: function() { 1032 qamousApp.scroll_top(); 1033 qamousApp.mobile_menu(); 1034 qamousApp.sticky_header(); 1035 qamousApp.scroll_bar(); 1036 qamousApp.nice_select_data_picker(); 1037 qamousApp.bg_parallax(); 1038 qamousApp.sticky_sidebar(); 1039 qamousApp.count_down(); 1040 qamousApp.featured_location_slider(); 1041 qamousApp.client_review_carousel(); 1042 qamousApp.brands_carousel(); 1043 qamousApp.features_cat_carousel(); 1044 qamousApp.todo_items_carousel(); 1045 qamousApp.listing_todo_single(); 1046 qamousApp.grid_masonry();
1047 qamousApp.review_rating(); 1048 qamousApp.single_product(); 1049 qamousApp.listing_gallery(); 1050 qamousApp.input_spinner(); 1051 qamousApp.youtube_video(); 1052 qamousApp.testimonial(); 1053 qamousApp.price_distance_range(); 1054 qamousApp.mega_menu_carousel(); 1055 qamousApp.add_listing_tab(); 1056 qamousApp.circle_progress(); 1057 qamousApp.line_chart(); 1058 qamousApp.tag_keyword(); 1059 qamousApp.counter(); 1060 } 1061 }; 1062 1063 /* --------------------------------------------- 1064 Document ready function 1065 --------------------------------------------- */ 1066 $(function() { 1067 qamousApp.initializ(); 1068 }); 1069 1070 1071})(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.