1(function($) { 2 3 "use strict"; 4 5 $(window).on('load', function() { 6 7 /* Page Loader active 8 ========================================================*/ 9 $('#preloader').fadeOut(); 10 11 /* MixitUp 12 ========================================================================== */ 13 $('#portfolio').mixItUp(); 14 15 /* Sticky Nav 16 ========================================================================== */ 17 var stickyToggle = function(sticky, stickyWrapper, scrollElement) { 18 var stickyHeight = sticky.outerHeight(); 19 var stickyTop = stickyWrapper.offset().top; 20 if (scrollElement.scrollTop() >= stickyTop){ 21 stickyWrapper.height(stickyHeight); 22 sticky.addClass("is-sticky"); 23 } 24 else{ 25 sticky.removeClass("is-sticky"); 26 stickyWrapper.height('auto'); 27 } 28 }; 29 30 // Find all data-toggle="sticky-onscroll" elements 31 $('[data-toggle="sticky-onscroll"]').each(function() { 32 var sticky = $(this); 33 var stickyWrapper = $('<div>').addClass('sticky-wrapper'); // insert hidden element to maintain actual top offset on page 34 sticky.before(stickyWrapper); 35 sticky.addClass('sticky'); 36 37 // Scroll & resize events 38 $(window).on('scroll.sticky-onscroll resize.sticky-onscroll', function() { 39 stickyToggle(sticky, stickyWrapper, $(this)); 40 }); 41 42 // On page load 43 stickyToggle(sticky, stickyWrapper, $(window)); 44 }); 45 46 /* slicknav mobile menu active 47 ========================================================================== */ 48 $('.mobile-menu').slicknav({ 49 prependTo: '.navbar-header', 50 parentTag: 'liner', 51 allowParentLinks: true, 52 duplicate: true, 53 label: '', 54 closedSymbol: '<i class="lni-chevron-right"></i>', 55 openedSymbol: '<i class="lni-chevron-down"></i>', 56 }); 57 58 /* WOW Scroll Spy 59 ========================================================*/ 60 var wow = new WOW({ 61 //disabled for mobile 62 mobile: false 63 }); 64 wow.init(); 65 66 /* Nivo Lightbox 67 ========================================================*/ 68 $('.lightbox').nivoLightbox({ 69 effect: 'fadeScale', 70 keyboardNav: true, 71 }); 72 73 /* Counter 74 ========================================================*/ 75 $('.counterUp').counterUp({ 76 delay: 10, 77 time: 1000 78 }); 79 80 /* Range Slider 81 ========================================================*/ 82 $("#range").ionRangeSlider({ 83 hide_min_max: true, 84 keyboard: true, 85 min: 0, 86 max: 5000, 87 from: 1000, 88 to: 4000, 89 type: 'double', 90 step: 1, 91 prefix: "$", 92 grid: true 93 }); 94 95 /* Testimonials Carousel 96 ========================================================*/ 97 var owl = $("#testimonials"); 98 owl.owlCarousel({ 99 navigation: false, 100 pagination: true, 101 slideSpeed: 1000, 102 stopOnHover: true, 103 autoPlay: true, 104 items: 3, 105 itemsDesktop : [1199,3], 106 itemsDesktopSmall : [980,2], 107 itemsTablet: [768,1], 108 itemsTablet: [767,1], 109 itemsTabletSmall: [480,1], 110 itemsMobile : [479,1], 111 }); 112 113 /* Latest Property Owl Carousel active 114 ========================================================*/ 115 var owl = $("#latest-property"); 116 owl.owlCarousel({ 117 navigation: false, 118 pagination: true, 119 slideSpeed: 1000, 120 stopOnHover: true, 121 autoPlay: true, 122 items: 3, 123 itemsDesktopSmall: [1024, 2], 124 itemsTablet: [600, 1], 125 itemsMobile: [479, 1] 126 }); 127 128 /* Latest Property Owl Carousel active 129 ========================================================*/ 130 var owl = $("#listing-carousel"); 131 owl.owlCarousel({ 132 navigation: true, 133 pagination: false, 134 slideSpeed: 1000, 135 stopOnHover: true, 136 autoPlay: false, 137 items: 1, 138 itemsDesktopSmall: [1024, 1], 139 itemsTablet: [600, 1], 140 itemsMobile: [479, 1] 141 }); 142 143 /* property Owl Carousel active 144 ========================================================*/ 145 var owl = $("#property-slider"); 146 owl.owlCarousel({ 147 navigation: true, 148 pagination: false, 149 slideSpeed: 1000, 150 stopOnHover: true, 151 autoPlay: true, 152 items: 1, 153 itemsDesktopSmall: [1024, 1], 154 itemsTablet: [600, 1], 155 itemsMobile: [479, 1] 156 });
157 158 var newProducts = $('#listing-carousel'); 159 newProducts.find('.owl-prev').html('<i class="lni-chevron-left"></i>'); 160 newProducts.find('.owl-next').html('<i class="lni-chevron-right"></i>'); 161 162 var touchSlider = $('#property-slider'); 163 touchSlider.find('.owl-prev').html('<i class="lni-chevron-left"></i>'); 164 touchSlider.find('.owl-next').html('<i class="lni-chevron-right"></i>'); 165 166 var testiCarousel = $('.testimonials-carousel'); 167 testiCarousel.find('.owl-prev').html('<i class="lni-chevron-left"></i>'); 168 testiCarousel.find('.owl-next').html('<i class="lni-chevron-right"></i>'); 169 170 /* owl Carousel active 171 ========================================================*/ 172 var owl; 173 $(window).on('load', function() { 174 owl = $("#owl-demo"); 175 owl.owlCarousel({ 176 navigation: false, // Show next and prev buttons 177 slideSpeed: 300, 178 paginationSpeed: 400, 179 singleItem: true, 180 afterInit: afterOWLinit, // do some work after OWL init 181 afterUpdate : afterOWLinit 182 }); 183 184 function afterOWLinit() { 185 // adding A to div.owl-page 186 $('.owl-controls .owl-page').append('<a class="item-link" />'); 187 var pafinatorsLink = $('.owl-controls .item-link'); 188 /** 189 * this.owl.userItems - it's your HTML <div class="item"><img src="http://www.ow...t of us"></div> 190 */ 191 $.each(this.owl.userItems, function (i) { 192 $(pafinatorsLink[i]) 193 // i - counter 194 // Give some styles and set background image for pagination item 195 .css({ 196 'background': 'url(' + $(this).find('img').attr('src') + ') center center no-repeat', 197 '-webkit-background-size': 'cover', 198 '-moz-background-size': 'cover', 199 '-o-background-size': 'cover', 200 'background-size': 'cover' 201 }) 202 // set Custom Event for pagination item 203 .on('click',function () { 204 owl.trigger('owl.goTo', i); 205 }); 206 207 }); 208 // add Custom PREV NEXT controls 209 $('.owl-pagination').prepend('<a href="#prev" class="prev-owl"/>'); 210 $('.owl-pagination').append('<a href="#next" class="next-owl"/>'); 211 // set Custom event for NEXT custom control 212 $(".next-owl").on('click',function () { 213 owl.trigger('owl.next'); 214 }); 215 // set Custom event for PREV custom control 216 $(".prev-owl").on('click',function () { 217 owl.trigger('owl.prev'); 218 }); 219 } 220 }); 221 222 /* Property Grids active 223 ========================================================*/ 224 var itemList = $('.listing-container'); 225 var gridStyle = $('.grid'); 226 var listStyle = $('.list'); 227 228 $('.list,switchToGrid').on('click',function(e) { 229 e.preventDefault(); 230 itemList.addClass("list-layout"); 231 itemList.removeClass("grid-layout"); 232 gridStyle.removeClass("active"); 233 listStyle.addClass("active"); 234 }); 235 236 gridStyle.on('click',function(e) { 237 e.preventDefault(); 238 listStyle.removeClass("active"); 239 $(this).addClass("active"); 240 itemList.addClass("grid-layout"); 241 itemList.removeClass("list-layout"); 242 }); 243 244 /* Back Top Link active 245 ========================================================*/ 246 var offset = 200; 247 var duration = 500; 248 $(window).scroll(function() { 249 if ($(this).scrollTop() > offset) { 250 $('.back-to-top').fadeIn(400); 251 } else { 252 $('.back-to-top').fadeOut(400); 253 } 254 }); 255 256 $('.back-to-top').on('click',function(event) { 257 event.preventDefault(); 258 $('html, body').animate({ 259 scrollTop: 0 260 }, 600); 261 return false; 262 }); 263 264 /* Show options js 265 ========================================================*/ 266 $('.show-options').on("click", function() { 267 $('.option-hide').slideToggle('slow'); 268 $(this).toggleClass('active'); 269 event.preventDefault(); 270 }); 271 272 /* stellar js 273 ========================================================*/ 274 $.stellar({ 275 horizontalScrolling: false, 276 verticalOffset: 40 277 }); 278 279 }); 280 281}(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.