1(function($) { 2 "use strict"; 3 4$(".scrollup").pageup(); 5 6$(document).ready(function() { 7 8 9 $("#owl-demo").owlCarousel({ 10 autoPlay: 3000, 11 items : 4, 12 itemsDesktop : [1170,3], 13 itemsDesktopSmall : [1170,3] 14 }); 15 16 $("#owl-demo2").owlCarousel({ 17 autoPlay : 5000, 18 stopOnHover : true, 19 navigation: false, 20 paginationSpeed : 1000, 21 goToFirstSpeed : 2000, 22 singleItem : true, 23 autoHeight : true, 24 transitionStyle:"fade" 25 }); 26 27 $("#owl-demo3").owlCarousel({ 28 autoPlay : 5000, 29 stopOnHover : true, 30 navigation: false, 31 paginationSpeed : 1000, 32 goToFirstSpeed : 2000, 33 singleItem : true, 34 autoHeight : true, 35 transitionStyle:"fadeUp" 36 }); 37 38 $("#owl-demo4").owlCarousel({ 39 autoPlay : 5000, 40 stopOnHover : true, 41 navigation: false, 42 paginationSpeed : 1000, 43 goToFirstSpeed : 2000, 44 singleItem : true, 45 autoHeight : true, 46 transitionStyle:"goDown" 47 }); 48 49 $("#owl-demo5").owlCarousel({ 50 autoPlay : 8000, 51 stopOnHover : true, 52 navigation: false, 53 paginationSpeed : 1000, 54 goToFirstSpeed : 2000, 55 singleItem : true, 56 autoHeight : true, 57 transitionStyle:"goDown" 58 }); 59 60 $("#owl-demo6").owlCarousel({ 61 autoPlay : 5000, 62 stopOnHover : true, 63 navigation: false, 64 paginationSpeed : 1000, 65 goToFirstSpeed : 2000, 66 singleItem : true, 67 autoHeight : true, 68 transitionStyle:"fadeUp" 69 }); 70 71 $("#owl-demo7").owlCarousel({ 72 items : 4, 73 lazyLoad : true, 74 navigation : true, 75 pagination:false, 76 }); 77 78 $("#owl-demo8").owlCarousel({ 79 autoPlay : 5000, 80 stopOnHover : true, 81 singleItem : true, 82 paginationSpeed : 1000, 83 goToFirstSpeed : 2000, 84 transitionStyle:"fade" 85 }); 86 87 $("#owl-demo10").owlCarousel({ 88 autoPlay : 8000, 89 stopOnHover : true, 90 navigation: false, 91 paginationSpeed : 1000, 92 goToFirstSpeed : 2000, 93 singleItem : true, 94 autoHeight : true, 95 transitionStyle:"backSlide" 96 }); 97 98 $("#owl-demo11").owlCarousel({ 99 autoPlay : 5000, 100 stopOnHover : true, 101 navigation: false, 102 paginationSpeed : 1000, 103 goToFirstSpeed : 2000, 104 singleItem : true, 105 autoHeight : true, 106 transitionStyle:"backSlide" 107 }); 108 109 $("#owl-demo12").owlCarousel({ 110 autoPlay : 18000, 111 stopOnHover : true, 112 navigation: false, 113 paginationSpeed : 1000, 114 goToFirstSpeed : 2000, 115 singleItem : true, 116 }); 117 118 $("#owl-demo13").owlCarousel({ 119 autoPlay : 18000, 120 stopOnHover : true, 121 navigation: false, 122 paginationSpeed : 1000, 123 goToFirstSpeed : 2000, 124 singleItem : true, 125 }); 126 127 $("#owl-demo14").owlCarousel({ 128 autoPlay : 5000, 129 stopOnHover : true, 130 navigation: false, 131 paginationSpeed : 1000, 132 goToFirstSpeed : 2000, 133 singleItem : true, 134 autoHeight : true, 135 transitionStyle:"goDown" 136 }); 137 138 $("#owl-demo15").owlCarousel({ 139 autoPlay : 9000, 140 stopOnHover : true, 141 lazyLoad : true, 142 pagination:true, 143 singleItem : true, 144 }); 145 146 $("#owl-demo16").owlCarousel({ 147 autoPlay : 12000, 148 stopOnHover : true, 149 lazyLoad : true, 150 pagination:true, 151 singleItem : true, 152 }); 153 154 $("#owl-demo17").owlCarousel({ 155 items : 2, 156 autoPlay : 9000, 157 stopOnHover : true, 158 lazyLoad : true, 159 pagination:true, 160 itemsDesktop : [1170,2], 161 itemsDesktopSmall : [1170,2] 162 }); 163 164 $("#owl-demo18").owlCarousel({ 165 autoPlay : 9000, 166 stopOnHover : true, 167 navigation: true, 168 paginationSpeed : 1000, 169 goToFirstSpeed : 2000, 170 singleItem : true, 171 autoHeight : true, 172 pagination:false, 173 transitionStyle:"backSlide" 174 }); 175 176 $("#owl-demo20").owlCarousel({ 177 autoPlay : 18000, 178 stopOnHover : true, 179 navigation: false, 180 paginationSpeed : 1000, 181 goToFirstSpeed : 2000, 182 singleItem : true, 183 autoHeight : true, 184 }); 185 186 var time = 7; // time in seconds 187 188 var $progressBar, 189 $bar, 190 $elem, 191 isPause, 192 tick, 193 percentTime; 194 195 //Init the carousel 196 $("#owl-demo9").owlCarousel({ 197 slideSpeed : 500, 198 navigation: true, 199 paginationSpeed : 500, 200 singleItem : true, 201 afterInit : progressBar, 202 afterMove : moved, 203 startDragging : pauseOnDragging 204 }); 205 206 //Init progressBar where elem is $("#owl-demo") 207 function progressBar(elem){ 208 $elem = elem; 209 //build progress bar elements 210 buildProgressBar(); 211 //start counting 212 start(); 213 } 214 215 //create div#progressBar and div#bar then prepend to $("#owl-demo") 216 function buildProgressBar(){ 217 $progressBar = $("<div>",{ 218 id:"progressBar" 219 }); 220 $bar = $("<div>",{ 221 id:"bar" 222 }); 223 $progressBar.append($bar).prependTo($elem); 224 } 225 226 function start() { 227 //reset timer 228 percentTime = 0; 229 isPause = false; 230 //run interval every 0.01 second 231 tick = setInterval(interval, 10); 232 }; 233 234 function interval() { 235 if(isPause === false){ 236 percentTime += 1 / time; 237 $bar.css({ 238 width: percentTime+"%" 239 }); 240 //if percentTime is equal or greater than 100 241 if(percentTime >= 100){ 242 //slide to next item 243 $elem.trigger('owl.next') 244 } 245 } 246 } 247 248 //pause while dragging 249 function pauseOnDragging(){ 250 isPause = true; 251 } 252 253 //moved callback 254 function moved(){ 255 //clear interval 256 clearTimeout(tick); 257 //start again 258 start(); 259 } 260 261
262 263 var sync1 = $("#sync1"); 264 var sync2 = $("#sync2"); 265 266 sync1.owlCarousel({ 267 singleItem : true, 268 slideSpeed : 1000, 269 pagination:false, 270 afterAction : syncPosition, 271 responsiveRefreshRate : 200, 272 }); 273 274 sync2.owlCarousel({ 275 items : 5, 276 itemsDesktop : [1170,5], 277 itemsDesktopSmall : [979,5], 278 itemsTablet : [768,3], 279 itemsMobile : [479,3], 280 pagination:false, 281 responsiveRefreshRate : 100, 282 afterInit : function(el){ 283 el.find(".owl-item").eq(0).addClass("synced"); 284 } 285 }); 286 287 function syncPosition(el){ 288 var current = this.currentItem; 289 $("#sync2") 290 .find(".owl-item") 291 .removeClass("synced") 292 .eq(current) 293 .addClass("synced") 294 if($("#sync2").data("owlCarousel") !== undefined){ 295 center(current) 296 } 297 298 } 299 300 $("#sync2").on("click", ".owl-item", function(e){ 301 e.preventDefault(); 302 var number = $(this).data("owlItem"); 303 sync1.trigger("owl.goTo",number); 304 }); 305 306 function center(number){ 307 var sync2visible = sync2.data("owlCarousel").owl.visibleItems; 308 309 var num = number; 310 var found = false; 311 for(var i in sync2visible){ 312 if(num === sync2visible[i]){ 313 var found = true; 314 } 315 } 316 317 if(found===false){ 318 if(num>sync2visible[sync2visible.length-1]){ 319 sync2.trigger("owl.goTo", num - sync2visible.length+2) 320 }else{ 321 if(num - 1 === -1){ 322 num = 0; 323 } 324 sync2.trigger("owl.goTo", num); 325 } 326 } else if(num === sync2visible[sync2visible.length-1]){ 327 sync2.trigger("owl.goTo", sync2visible[1]) 328 } else if(num === sync2visible[0]){ 329 sync2.trigger("owl.goTo", num-1) 330 } 331 } 332 333 334 335 $("#colosebut1").click(function(){ 336 $("#div1").fadeOut("slow"); 337 }); 338 $("#colosebut2").click(function(){ 339 $("#div2").fadeOut("slow"); 340 }); 341 $("#colosebut3").click(function(){ 342 $("#div3").fadeOut("slow"); 343 }); 344 $("#colosebut4").click(function(){ 345 $("#div4").fadeOut("slow"); 346 }); 347 348 349 350 // Variables 351 var clickedTab = $(".tabs > .active"); 352 var tabWrapper = $(".tab__content"); 353 var activeTab = tabWrapper.find(".active"); 354 var activeTabHeight = activeTab.outerHeight(); 355 356 // Show tab on page load 357 activeTab.show(); 358 359 // Set height of wrapper on page load 360 tabWrapper.height(activeTabHeight); 361 362 $(".tabs > li").on("click", function() { 363 364 // Remove class from active tab 365 $(".tabs > li").removeClass("active"); 366 367 // Add class active to clicked tab 368 $(this).addClass("active"); 369 370 // Update clickedTab variable 371 clickedTab = $(".tabs .active"); 372 373 // fade out active tab 374 activeTab.fadeOut(100, function() { 375 376 // Remove active class all tabs 377 $(".tab__content > li").removeClass("active"); 378 379 // Get index of clicked tab 380 var clickedTabIndex = clickedTab.index(); 381 382 // Add class active to corresponding tab 383 $(".tab__content > li").eq(clickedTabIndex).addClass("active"); 384 385 // update new active tab 386 activeTab = $(".tab__content > .active"); 387 388 // Update variable 389 activeTabHeight = activeTab.outerHeight(); 390 391 // Animate height of wrapper to new tab height 392 tabWrapper.stop().delay(30).animate({ 393 height: activeTabHeight 394 }, 300, function() { 395 396 // Fade in active tab 397 activeTab.delay(30).fadeIn(100); 398 399 }); 400 }); 401 }); 402 403 404}); 405 406 407 408 409 410 411 412})(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.