底部弹出菜单,垂直和水平显示均可
XML/HTML Code
- <div style="width: 300px;margin: 10px auto">
- <div class="dw-btn btn-primary" style="width:300px;text-align:center;display: block;margin: 20px 0;cursor: pointer; " onClick="showList()">横向滚动菜单</div>
- <div class="dw-btn btn-success" style="width:300px;text-align:center;display: block;margin: 20px 0; " onClick="showList1()" >点击打开选择滚动菜单</div>
- <div class="dw-btn btn-danger" style="width:300px;text-align:center;display: block;margin: 20px 0; " onClick="showListbscroll()">bscroll的滚动效果</div>
- <div class="dw-btn btn-deepred" style="width:300px;text-align:center;display: block;margin: 20px 0; " onClick="showListnoborder()">没有分割线</div>
- </div>
JavaScript Code
- function showList(){
- $("body").scrollmenu({
- type:'cross',
- // bscroll:true,
- // animateIn:'bounceIn',
- // animateOut:'bounceOut',
- click:function(ret){
- if(ret.hasHref){
- return
- }else{
- // switch (ret.index){
- // case 0:
- // alert(0);
- // break;
- // }
- alert(JSON.stringify(ret));
- }
- }
- });
- }
原文地址:http://www.freejs.net/article_daohangcaidan_849.html