如何在Jquery中进行滚动

时间:2012-02-24 19:51:06

标签: jquery

 <ul id="accordion">
<li>
    <a href="#" class="item popular" rel="popular"></a>
    <ul id="inchat" class="list_friends">
        <li class="ch0"><img src="img/49992_720384020_1896998575_q.jpg" /></li>
        <li class="ch1"><img src="img/48983_615523712_8495_q.jpg" /></li>
        <li class="ch2"><img src="img/41621_717814907_4472_q.jpg" /></li>
    </ul>
</li>
<li>
    <a href="#" class="item category" rel="category"></a>
    <ul id="inchannel">
        <li class="icha0"><img  src="img/41403_1434825607_37944358_q.jpg"></li>
        <li class="icha1"><img  src="img/48983_615523712_8495_q.jpg"></li>
        <li class="icha2"><img  src="img/41621_717814907_4472_q.jpg"></li>
    </ul>
</li>
<li>
    <a href="#" class="item comment" rel="comment"></a>
    <ul id="online">
            <li class="ol0"><img src="img/49992_720384020_1896998575_q.jpg">Francois</li>
        <li class="ol1"><img src="img/48983_615523712_8495_q.jpg"></li>
        <li class="ol2"><img src="img/41621_717814907_4472_q.jpg"></li>
      <li class="ol3"><img src="img/370719_1533516291_84180615_q.jpg"></li>
        <li class="ol4"><img src="img/49057_584817416_4750_q.jpg"></li>
      <li class="ol5"><img src="img/41516_6421779_7771_q.jpg">Houston</li>
      <li class="ol6"><img src="img/370579_100003045138812_21247034_q.jpg"></li>
        <li class="ol7"><img src="img/41403_1434825607_37944358_q.jpg"></li>
        <li class="ol8"><img src="img/275282_701018_1327443121_q.jpg"></li>

    </ul>
</li>
</ul>

我想知道如何在Jquery中制作垂直滚动条我希望显示三个列表,当你按下向上或向下按钮时,它会向上或向下推一个列表 非常感谢你

1 个答案:

答案 0 :(得分:0)

这是一个没有垂直效果的快速解决方案(您可以使用):
http://jsfiddle.net/WW2yg/2/

如果不重新发明轮子,你总能找到已经这样做的插件,就像这样:
示例:http://tympanus.net/codrops/2011/07/22/vertical-sliding-accordion/
来源和教程:http://tympanus.net/Development/VerticalSlidingAccordion/example5.html

我希望它有所帮助。

干杯!