整个页面滚动显示不同的内容
本例用到的js和css请到演示页面查看
JavaScript Code
- <script>
- $(document).ready(function(){
- $(".main").onepage_scroll({
- sectionContainer: "section",
- responsiveFallback: 600
- });
- });
- </script>
XML/HTML Code
- <div class="wrapper">
- <div class="main">
- <section class="page1">
- <div class="page_container">
- <h1>整个页面滚动显示不同的内容</h1>
- </div>
- <img src="phones.png" alt="phones">
- </section>
- <section class="page2">
- <div class="page_container">
- <h1>Ready-to-use plugin</h1>
- <h2>All you need is an HTML markup, call the script and BAM!</h2>
- <code class="html">
- <div class="main"><br>
- <section>...</section><br>
- <section>...</section><br>
- ...<br>
- </div>
- </code>
- <code class="js">
- $(".main").onepage_scroll();
- </code>
- </div>
- </section>
- <section class="page3">
- <div class="page_container">
- <h1>本站有各种jquery效果</h1>
- </div>
- </section>
- </div>
- </div>
原文地址:http://www.freejs.net/article_jquerytupiantexiao_131.html