|
| 1 | +<!DOCTYPE html> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 | + <title>Callbacks - fullPage.js</title> |
| 7 | + <meta name="author" content="Alvaro Trigo Lopez" /> |
| 8 | + <meta name="description" content="fullPage callback function." /> |
| 9 | + <meta name="keywords" content="fullpage,jquery,demo,callbac,function,event" /> |
| 10 | + <meta name="Resource-type" content="Document" /> |
| 11 | + |
| 12 | + |
| 13 | + <link rel="stylesheet" type="text/css" href="../jquery.fullPage.css" /> |
| 14 | + <link rel="stylesheet" type="text/css" href="examples.css" /> |
| 15 | + |
| 16 | + <!--[if IE]> |
| 17 | + <script type="text/javascript"> |
| 18 | + var console = { log: function() {} }; |
| 19 | + </script> |
| 20 | + <![endif]--> |
| 21 | + |
| 22 | + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> |
| 23 | + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script> |
| 24 | + |
| 25 | + <script type="text/javascript" src="../vendors/scrolloverflow.js"></script> |
| 26 | + |
| 27 | + <script type="text/javascript" src="../jquery.fullPage.js"></script> |
| 28 | + <script type="text/javascript" src="examples.js"></script> |
| 29 | + <script type="text/javascript"> |
| 30 | + $(document).ready(function() { |
| 31 | + $('#fullpage').fullpage({ |
| 32 | + sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'], |
| 33 | + anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'], |
| 34 | + menu: '#menu', |
| 35 | + afterLoad: function(anchorLink, index){ |
| 36 | + |
| 37 | + //section 2 |
| 38 | + if(index == 2){ |
| 39 | + //moving the image |
| 40 | + $('#section1').find('img').delay(500).animate({ |
| 41 | + left: '0%' |
| 42 | + }, 1500, 'easeOutExpo'); |
| 43 | + |
| 44 | + $('#section1').find('p').first().fadeIn(1800, function(){ |
| 45 | + $('#section1').find('p').last().fadeIn(1800); |
| 46 | + });; |
| 47 | + |
| 48 | + } |
| 49 | + |
| 50 | + //section 3 |
| 51 | + if(anchorLink == '3rdPage'){ |
| 52 | + //moving the image |
| 53 | + $('#section2').find('.intro').delay(500).animate({ |
| 54 | + left: '0%' |
| 55 | + }, 1500, 'easeOutExpo'); |
| 56 | + } |
| 57 | + } |
| 58 | + }); |
| 59 | + |
| 60 | + }); |
| 61 | + </script> |
| 62 | + |
| 63 | + <style> |
| 64 | + #section1 img{ |
| 65 | + left: 130%; |
| 66 | + position:relative; |
| 67 | + } |
| 68 | + #section1 p{ |
| 69 | + display:none; |
| 70 | + } |
| 71 | + #section2 .intro{ |
| 72 | + left: -130%; |
| 73 | + position:relative; |
| 74 | + } |
| 75 | + </style> |
| 76 | + |
| 77 | +</head> |
| 78 | +<body> |
| 79 | + |
| 80 | + |
| 81 | +<select id="demosMenu"> |
| 82 | + <option selected>Choose Demo</option> |
| 83 | + <option id="activeSlide">Active section and slide</option> |
| 84 | + <option id="apple">Apple iPhone demo (animations)</option> |
| 85 | + <option id="autoHeight">Auto height</option> |
| 86 | + <option id="autoplayVideoAndAudio">Autoplay Video and Audio</option> |
| 87 | + <option id="backgrounds">Background images</option> |
| 88 | + <option id="backgroundsFixed">Fixed fullscreen backgrounds</option> |
| 89 | + <option id="backgroundVideo">Background video</option> |
| 90 | + <option id="callbacks">Callbacks</option> |
| 91 | + <option id="continuousHorizontal">Continuous horizontal</option> |
| 92 | + <option id="continuousVertical">Continuous vertical</option> |
| 93 | + <option id="css3">CSS3</option> |
| 94 | + <option id="dragAndMove">Drag And Move</option> |
| 95 | + <option id="easing">Easing</option> |
| 96 | + <option id="fadingEffect">Fading Effect</option> |
| 97 | + <option id="fixedHeaders">Fixed headers</option> |
| 98 | + <option id="gradientBackgrounds">Gradient backgrounds</option> |
| 99 | + <option id="interlockedSlides">Interlocked Slides</option> |
| 100 | + <option id="looping">Looping</option> |
| 101 | + <option id="methods">Methods</option> |
| 102 | + <option id="navigationV">Vertical navigation dots</option> |
| 103 | + <option id="navigationH">Horizontal navigation dots</option> |
| 104 | + <option id="noAnchor">No anchor links</option> |
| 105 | + <option id="normalScroll">Normal scrolling</option> |
| 106 | + <option id="offsetSections">Offset sections</option> |
| 107 | + <option id="oneSection">One single section</option> |
| 108 | + <option id="resetSliders">Reset sliders</option> |
| 109 | + <option id="responsiveAutoHeight">Responsive Auto Height</option> |
| 110 | + <option id="responsiveHeight">Responsive Height</option> |
| 111 | + <option id="responsiveWidth">Responsive Width</option> |
| 112 | + <option id="responsiveSlides">Responsive Slides</option> |
| 113 | + <option id="scrollBar">Scroll bar enabled</option> |
| 114 | + <option id="scrollHorizontally">Scroll horizontally</option> |
| 115 | + <option id="scrollOverflow">Scroll inside sections and slides</option> |
| 116 | + <option id="scrollOverflowReset">ScrollOverflow Reset</option> |
| 117 | + <option id="scrollingSpeed">Scrolling speed</option> |
| 118 | +</select> |
| 119 | + |
| 120 | +<ul id="menu"> |
| 121 | + <li data-menuanchor="firstPage"><a href="#firstPage">First slide</a></li> |
| 122 | + <li data-menuanchor="secondPage"><a href="#secondPage">Second slide</a></li> |
| 123 | + <li data-menuanchor="3rdPage"><a href="#3rdPage">Third slide</a></li> |
| 124 | +</ul> |
| 125 | + |
| 126 | +<div id="fullpage"> |
| 127 | + <div class="section " id="section0"> |
| 128 | + <h1>fullPage.js</h1> |
| 129 | + <p>Configure the easing jQuery UI effect!</p> |
| 130 | + <img src="imgs/fullPage.png" alt="fullPage" /> |
| 131 | + </div> |
| 132 | + <div class="section" id="section1"> |
| 133 | + <div class="intro"> |
| 134 | + <img src="imgs/1.png" alt="Cool" /> |
| 135 | + <h1>easeOutExpo</h1> |
| 136 | + <p>This example is working with `easeOutExpo` effect instead of the default `easeOutExpo`</p> |
| 137 | + <p>You can see more about them <a href="http://jqueryui.com/resources/demos/effect/easing.html" target="_blank">here</a></p> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + <div class="section" id="section2"> |
| 141 | + <div class="intro"> |
| 142 | + <h1>Cool uh?</h1> |
| 143 | + <p>Choose the best easing effect for your site!</p> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | +</div> |
| 147 | + |
| 148 | + |
| 149 | +</body> |
| 150 | +</html> |
0 commit comments