<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>jQuery Mobile模仿iphone菜单项</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> <script type="text/javascript"> //home菜单的onclick事件的处理方法 function fun1(){ //激活nav1 $('#nav1').addClass('ui-btn-active'); //显示我home菜单的内容 $('#show1').css('display',''); //grid,search,info都隐藏 $('#show2').css('display','none'); $('#show3').css('display','none'); $('#show4').css('display','none'); //nav2,nav3,nav4 取消激活 $('#nav2').removeClass('ui-btn-active'); $('#nav3').removeClass('ui-btn-active'); $('#nav4').removeClass('ui-btn-active'); } //grid菜单的onclick事件的处理方法 function fun2(){ //激活nav2 $('#nav2').addClass('ui-btn-active'); //显示我grid菜单的内容,home,search,info都隐藏 $('#show1').css('display','none'); $('#show2').css('display',''); $('#show3').css('display','none'); $('#show4').css('display','none'); //nav1,nav3,nav4 取消激活 $('#nav1').removeClass('ui-btn-active'); $('#nav3').removeClass('ui-btn-active'); $('#nav4').removeClass('ui-btn-active'); } //search菜单的onclick事件的处理方法 function fun3(){ //激活nav3 $('#nav3').addClass('ui-btn-active'); $('#show1').css('display','none'); $('#show2').css('display','none'); //显示我search菜单的内容,home,grid,info都隐藏 $('#show3').css('display',''); $('#show4').css('display','none'); //nav1,nav2,nav4 取消激活 $('#nav2').removeClass('ui-btn-active'); $('#nav1').removeClass('ui-btn-active'); $('#nav4').removeClass('ui-btn-active'); } //info菜单的onclick事件的处理方法 function fun4(){ $('#nav4').addClass('ui-btn-active'); $('#show1').css('display','none'); $('#show2').css('display','none'); $('#show3').css('display','none'); //显示我info菜单的内容,home,grid,search都隐藏 $('#show4').css('display',''); //nav1,nav2,nav3 取消激活 $('#nav2').removeClass('ui-btn-active'); $('#nav3').removeClass('ui-btn-active'); $('#nav1').removeClass('ui-btn-active'); } </script> </head> <body> <div data-role="page" id="page" data-theme="a"> <div data-role="header" data-position="fixed" data-theme="a"> <h1> 互普网管网络准入管理系统 </h1> <a href="javascript:location.reload();" data-role="button" class="ui-btn-right" data-icon="refresh">刷新</a> </div> <div data-role="content" id="show1"> <p> 如有不懂,请加qq群:135430763,共同学习! </p> </div> <div data-role="content" id="show2" style="display: none;"> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> </div> <div data-role="content" id="show3" style="display: none;"> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> </div> <div data-role="content" id="show4" style="display: none;"> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> <p> 如有不懂,请加qq群:135430763,共同学习! </p> </div> <div id="footer" class="nav-style" data-role="footer" data-theme="a" data-position="fixed"> <div data-role="navbar"> <ul> <!-- 默认显示home菜单 --> <li><a href="#" id="nav1" data-icon="home" onclick="fun1();return false;" class="ui-btn-active">One</a></li> <li><a href="#" id="nav2" data-icon="grid" onclick="fun2();return false;">Two</a></li> <li><a href="#" id="nav3" data-icon="search" onclick="fun3();return false;">Three</a></li> <li><a href="#" id="nav4" data-icon="info" onclick="fun4();return false;">Four</a></li> </ul> </div> </div> </div> </body> </html>更多功能示例,请点击下载:http://download.csdn.net/download/xmt1139057136/7451815
jqm选项卡开发,底部标签式设计,jqm模仿iPhone手机桌面菜单,jqm实战开发,jqm开发例子Demo,布布扣,bubuko.com
jqm选项卡开发,底部标签式设计,jqm模仿iPhone手机桌面菜单,jqm实战开发,jqm开发例子Demo
原文:http://blog.csdn.net/xmtblog/article/details/28690699