example of using the YUI scrollview for mobile devices (http:
First create your content. You can use a ul/ol or any content that overflows a div. If you want to show scrollbars make sure to set the class either at the document or container level to "yui-skin-sam"
<div id="list-view" style="yui3-scrollview-loading" class="yui-skin-sam" >
<div id="scrollable">
<ul>
<li><div>AC/DC</div></li>
<li><div>Aerosmith</div></li>
<li><div>Billy Joel</div></li>
<li><div>Bob Dylan</div></li>
<li><div>Bob Seger</div></li>
<li><div>Bon Jovi</div></li>
<li><div>Bruce Springsteen</div></li>
<li><div>Creed</div></li>
<li><div>Creedence Clearwater Revival</div></li>
<li><div>Dave Matthews Band</div></li>
<li><div>Def Leppard</div></li>
<li><div>Eagles</div></li>
<li><div>Eminem</div></li>
<li><div>Fleetwood Mac</div></li>
<li><div>Green Day</div></li>
<li><div>Guns N' Roses</div></li>
<li><div>James Taylor</div></li>
<li><div>Jay-Z</div></li>
<li><div>Jimi Hendrix</div></li>
<li><div>Led Zeppelin</div></li>
<li><div>Lynyrd Skynyrd</div></li>
<li><div>Metallica</div></li>
<li><div>Motley Crue</div></li>
<li><div>Neil Diamond</div></li>
<li><div>Nirvana</div></li>
<li><div>Ozzy Osbourne</div></li>
<li><div>Pearl Jam</div></li>
<li><div>Pink Floyd</div></li>
<li><div>Queen</div></li>
<li><div>Rod Stewart</div></li>
<li><div>Rush</div></li>
<li><div>Santana</div></li>
<li><div>Simon and Garfunkel</div></li>
<li><div>Steve Miller Band</div></li>
<li><div>The Beatles</div></li>
<li><div>The Doors</div></li>
<li><div>The Police</div></li>
<li><div>The Rolling Stones</div></li>
<li><div>Tom Petty</div></li>
<li><div>U2</div></li>
<li><div>Van Halen</div></li>
<li><div>Willie Nelson</div></li>
<li><div>ZZ Top</div></li>
</ul>
</div>
</div>
<!-- import the YUI library -->
<script type="text/javascript" charset="utf-8" src="http://yui.yahooapis.com/3.2.0/build/yui/yui.js"></script>
<script type="text/javascript" charset="utf-8">
// Now instantiate the scroller -- the call back is executed when the library is ready.
// The callback creates a new Scrollview and sets the srcNode to the div id.
// Set the height of the scrollview as needed.
YUI().use('scrollview', function(Y) {
var scrollView = new Y.ScrollView({
srcNode: '#scrollable',
height: 310
});
// finally render the scrollView
scrollView.render();
});
</script>
<!-- now just test it -->