philippfrenzel/yii2slidebars

View on GitHub
examples/momentum-scrolling.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html>
    <head>
        <title>Slidebars Momentum Scrolling Example</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        
        <!-- Slidebars CSS -->
        <link rel="stylesheet" href="slidebars/slidebars.css">
        
        <!-- Example Styles -->
        <link rel="stylesheet" href="example-styles.css">
    </head>
    
    <body>    
        <div id="sb-site">
            <h1>Slidebars Momentum Scrolling Example</h1>
            <p>iOS offers a special webkit property to allow native style momentum scrolling on overflowing elements. You can add the class '.sb-momentum-scrolling' to your Slidebars to achieve this. In this example, the <a class="sb-open-left" href="#">left</a> Slidebar has smooth scrolling enabled whereas the <a class="sb-open-right" href="#">right</a> does not. You'll need to view this page on an iOS device/simulator to see it working.</p>
            <ul>
                <li class="sb-toggle-left">Toggle left Slidebar</li>
                <li class="sb-toggle-right">Toggle right Slidebar</li>
                <li class="sb-open-left">Open left Slidebar</li>
                <li class="sb-open-right">Open right Slidebar</li>
                <li class="sb-close">Close either Slidebar</li>
            </ul>
            
            <h2>More Examples</h2>
            <ul>
                <li><a href="control-classes.html">Control Classes</a></li>
                <li><a href="api-usage.html">API Usage</a></li>
                <li><a href="mobile-only.html">Mobile Only</a></li>
                <li><a href="animation-styles.html">Animation Styles</a></li>
                <li><a href="optional-widths.html">Optional Widths</a></li>
                <li><a href="custom-widths.html">Custom Widths</a></li>
                <li><a href="scroll-lock.html">Scroll Lock</a></li>
                <li><a href="slidebar-links.html">Slidebar Links</a></li>
                <li><a href="static-slidebars.html">Static Slidebars</a></li>
                <li><a href="momentum-scrolling.html">Momentum Scrolling</a></li>
                <li><a href="left-slidebar-only.html">Left Slidebar Only</a></li>
                <li><a href="right-slidebar-only.html">Right Slidebar Only</a></li>
            </ul>
        </div>
        
        <div class="sb-slidebar sb-left sb-momentum-scrolling">
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae lorem eleifend, ultricies nisi tempor, dapibus dui. Ut iaculis adipiscing mi, at lacinia augue pulvinar in. Pellentesque et nunc a libero cursus posuere. Fusce semper metus id nunc laoreet vulputate. Maecenas sit amet augue ornare, tempus augue eget, scelerisque arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis diam ac est ultricies vestibulum. Aenean nec rhoncus lorem. Nam velit elit, mollis in blandit vel, pellentesque id augue. In hac habitasse platea dictumst. Nunc placerat est eget vulputate tristique. Sed turpis libero, aliquam at dolor eu, consectetur tincidunt est. Nulla vel semper dui, porttitor gravida lacus. Mauris lacinia pharetra tincidunt. Nunc varius mattis molestie.</p>
            
            <p>Sed quis velit leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam malesuada lobortis commodo. Maecenas egestas augue diam, eget semper massa sodales nec. Nunc fermentum suscipit augue, at sagittis mauris. Vestibulum in turpis elementum, facilisis ipsum vitae, fermentum erat. Integer sodales at dolor vitae porttitor. Pellentesque tempus in eros eu elementum. Phasellus molestie, ligula et elementum feugiat, libero purus mollis metus, quis semper tellus velit ut risus. Nullam adipiscing erat ac tortor rutrum, eu laoreet libero sollicitudin. Nunc auctor et sem quis fringilla. In erat lacus, rutrum in erat id, lacinia cursus velit. Pellentesque consequat sit amet justo non aliquet. Donec ligula eros, convallis sit amet vehicula et, dignissim id velit.</p>
            
            <p>Suspendisse sodales ornare dui sed tincidunt. Praesent bibendum nisl ac neque posuere ultrices. Sed ac nisl id augue lobortis venenatis. Morbi eros urna, sollicitudin tristique justo ac, sodales feugiat sem. Donec auctor placerat leo, quis auctor lorem laoreet vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur viverra nulla ac fringilla dictum. Maecenas sed dapibus arcu. Morbi nec feugiat tellus. Donec rutrum, tellus vitae sollicitudin tincidunt, ligula elit feugiat ligula, eget sollicitudin libero felis vel augue. Duis et massa fringilla, vehicula arcu sed, ultricies ligula. Praesent porttitor gravida posuere.</p>
        </div>
        
        <div class="sb-slidebar sb-right">
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae lorem eleifend, ultricies nisi tempor, dapibus dui. Ut iaculis adipiscing mi, at lacinia augue pulvinar in. Pellentesque et nunc a libero cursus posuere. Fusce semper metus id nunc laoreet vulputate. Maecenas sit amet augue ornare, tempus augue eget, scelerisque arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis diam ac est ultricies vestibulum. Aenean nec rhoncus lorem. Nam velit elit, mollis in blandit vel, pellentesque id augue. In hac habitasse platea dictumst. Nunc placerat est eget vulputate tristique. Sed turpis libero, aliquam at dolor eu, consectetur tincidunt est. Nulla vel semper dui, porttitor gravida lacus. Mauris lacinia pharetra tincidunt. Nunc varius mattis molestie.</p>
            
            <p>Sed quis velit leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam malesuada lobortis commodo. Maecenas egestas augue diam, eget semper massa sodales nec. Nunc fermentum suscipit augue, at sagittis mauris. Vestibulum in turpis elementum, facilisis ipsum vitae, fermentum erat. Integer sodales at dolor vitae porttitor. Pellentesque tempus in eros eu elementum. Phasellus molestie, ligula et elementum feugiat, libero purus mollis metus, quis semper tellus velit ut risus. Nullam adipiscing erat ac tortor rutrum, eu laoreet libero sollicitudin. Nunc auctor et sem quis fringilla. In erat lacus, rutrum in erat id, lacinia cursus velit. Pellentesque consequat sit amet justo non aliquet. Donec ligula eros, convallis sit amet vehicula et, dignissim id velit.</p>
            
            <p>Suspendisse sodales ornare dui sed tincidunt. Praesent bibendum nisl ac neque posuere ultrices. Sed ac nisl id augue lobortis venenatis. Morbi eros urna, sollicitudin tristique justo ac, sodales feugiat sem. Donec auctor placerat leo, quis auctor lorem laoreet vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur viverra nulla ac fringilla dictum. Maecenas sed dapibus arcu. Morbi nec feugiat tellus. Donec rutrum, tellus vitae sollicitudin tincidunt, ligula elit feugiat ligula, eget sollicitudin libero felis vel augue. Duis et massa fringilla, vehicula arcu sed, ultricies ligula. Praesent porttitor gravida posuere.</p>
        </div>
                
        <!-- jQuery -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        
        <!-- Slidebars -->
        <script src="slidebars/slidebars.js"></script>
        <script>
            (function($) {
                $(document).ready(function() {
                    $.slidebars();
                });
            }) (jQuery);
        </script>
    </body>
</html>