1(function($) { 2 "use strict"; 3 4 // Interactive phone screen 5 window.interactiveCards = function ( options ) { 6 7 var values = { 8 container: options.containerId, 9 frontAnimation: options.frontAnimation, 10 rearAnimation: options.rearAnimation, 11 contentAnimation: options.contentAnimation, 12 revealTime: options.revealTime 13 }; 14 15 16 var interactiveCard = $( '#'+values.container ); 17 var frontContent = $( '#'+values.container+' .front-content' ); 18 var imageScreen = $( '#'+values.container+' .front-content .image-screen' ); 19 var imageScreenBg = imageScreen.data( 'bg' ); 20 var contentShow = $( '#'+values.container+' .content' ); 21 var closeMe = $( '#'+values.container+' .close-me' ); 22 23 imageScreen.on( 'click', function() { 24 $(this).removeClass( values.frontAnimation.end ).addClass( values.frontAnimation.start ); 25 setTimeout( function() { 26 frontContent.removeClass( values.rearAnimation.end ).addClass( values.rearAnimation.start ); 27 setTimeout( function() { 28 contentShow.addClass( values.contentAnimation ); 29 }, options.revealTime * 2 ); 30 }, options.revealTime ); 31 } ); 32 33 closeMe.on( 'click', function() { 34 contentShow.removeClass( values.contentAnimation ); 35 setTimeout( function() { 36 frontContent.removeClass( values.rearAnimation.start ).addClass( values.rearAnimation.end ); 37 setTimeout( function() { 38 imageScreen.removeClass( values.frontAnimation.start ).addClass( values.frontAnimation.end ); 39 }, options.revealTime * 2 ); 40 },options.revealTime ); 41 } ); 42 43 44 /** 45 * Carousel Scripts 46 */ 47 var carouselContainer = $( '#'+options.containerId+' .carousel-container' ), 48 carousel = carouselContainer.find( 'ul' ), 49 carouselItem = carousel.find( 'li' ), 50 containerWidth = carouselContainer.width(), 51 carouselItemWidth = carouselItem.first().children( 'img' ).width(), 52 carouselItemQuantity = carousel.children( 'li' ).length, 53 carouselWidth = carouselItemWidth * carouselItemQuantity, 54 currentItem = 1; 55 56 carousel.css( 'width', carouselWidth+'px' ); 57 carouselItem.css( 'width', containerWidth+'px' ); 58 59 var navSelector = $( '#'+options.containerId+' a.nav' ); 60 navSelector.on( 'click', function(e) { 61 e.preventDefault(); 62 var navButtonSelector = $(this).data( 'nav' ); 63 if( 'next' === navButtonSelector ) { 64 if( currentItem === carouselItemQuantity ) { 65 currentItem = 1; 66 scrollIn( currentItem, carouselItemWidth ); 67 }else { 68 currentItem++; 69 scrollIn( currentItem, carouselItemWidth ); 70 } 71 }else if( 'prev' === navButtonSelector ) { 72 if( currentItem == 1 ) { 73 currentItem = carouselItemQuantity; 74 scrollIn( currentItem, carouselItemWidth ); 75 }else { 76 currentItem--; 77 scrollIn( currentItem, carouselItemWidth ); 78 } 79 } 80 } ); 81 82 function scrollIn( currentItem, width ) { 83 var slideItem = -( currentItem - 1 ) * width; 84 carousel.animate({ 85 'left': slideItem, 86 }); 87 } 88 89 // NiceScroll Effect 90 $( '.content-overflow' ).niceScroll({ 91 cursorcolor: "#424242", 92 cursorwidth: "5px", 93 cursorborder: "1px solid #fff", 94 cursorborderradius: "5px", 95 zindex: 1000, 96 }); 97 98 } 99 100})(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.