欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

用jquery統(tǒng)計子菜單的條數(shù)示例代碼

 更新時間:2013年10月18日 11:18:53   作者:  
統(tǒng)計子菜單條數(shù)的方法有很多,在本文為大家詳細(xì)介紹下使用jquery是如何實現(xiàn)的,感興趣的朋友不要錯過
 
jquery tab特效~ (類似選項卡)http://www.dbjr.com.cn/article/42151.htm
復(fù)制代碼 代碼如下:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tabs</title>
<style type="text/css">
/* Remove margin padding */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td { margin:0; padding:0; }

/* Default Font */
body,button,input,select,textarea { font:12px/1.5 \5b8b\4f53,arial,sans-serif; }
h1,h2,h3,h4,h5,h6 { font-size:100%; }
address,cite,dfn,em,var { font-style:normal; }
code,kbd,pre,samp { font-family:courier new,courier,monospace; }
small { font-size:12px; }
ul,ol { list-style:none; }
a { text-decoration:none; }
a:hover { text-decoration:underline; }
sup { vertical-align:text-top; }
sub { vertical-align:text-bottom; }
legend { color:#000; }
fieldset,img { border:0; }
button,input,select,textarea{ font-size:100%; }
table { border-collapse:collapse; border-spacing:0; }

.col-main{ float:left; width:100%; min-height:1px; }
.col-sub,.col-extra { float:left; }
.layout:after,.main-wrap:after,.col-sub:after,.col-extra:after { content:'\20'; display:block; height:0; clear:both; }
.layout,.main-wrap,.col-sub,.col-extra { zoom:1; }

/* Common Features */
.hidden { display:none; }
.invisible { visibility:hidden; }

/* Remove Float */
.clear { display:block; height:0; overflow:hidden; clear:both; }
.clearfix:after { content:'\20'; display:block; height:0; clear:both; }
.clearfix { *zoom:1; }

/* For non ie browsers also display the vertical scroll bar by default, to prevent the flicker caused by the scroll bar */
html { overflow-y:scroll; }

/* Default link styles */
a:link {color: #003399; }
a:visited {color: #123689;}
a:hover {color: #FF6600;}
</style>
</head>
<body>

<style type="text/css">
.menu { width:200px; border:1px solid #CCC; margin-bottom:20px }
.menu h3 { height:30px; line-height:30px; background:#ccc; }
.menu .num { font-weight:bold; color:red; padding-left:30px; }
</style>

<div class="menu">
<h3>系統(tǒng)設(shè)置 <span class="num"></span></h3>
<ul>
<li>菜單1</li>
<li>菜單2</li>
<li>菜單3</li>
<li>菜單4</li>
<li>菜單5</li>
<li>菜單6</li>
</ul>
</div>

<div class="menu">
<h3>菜單設(shè)置2 <span class="num"></span></h3>
<ul>
<li>菜單1</li>
<li>菜單2</li>
<li>菜單3</li>

</ul>
</div>

<div class="menu">
<h3>菜單設(shè)置3 <span class="num"></span></h3>
<ul>
<li>菜單1</li>
<li>菜單2</li>
<li>菜單3</li>
<li>菜單4</li>

<li>菜單5</li>
</ul>
</div>


<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
for ( var i=0; i<$('.menu').length; i++){
var num = $('.menu').eq(i).children('ul').children('li').length;
$('.menu').eq(i).find('.num').text(num);
}
</script>
</body>
</html>

相關(guān)文章

  • 修改Jquery Dialog 位置的實現(xiàn)方法

    修改Jquery Dialog 位置的實現(xiàn)方法

    下面小編就為大家?guī)硪黄薷腏query Dialog 位置的實現(xiàn)方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2016-08-08
  • jquery禁用右鍵示例

    jquery禁用右鍵示例

    這篇文章主要介紹了jquery禁用右鍵示例,需要的朋友可以參考下
    2014-04-04
  • jQuery利用sort對DOM元素進行排序操作

    jQuery利用sort對DOM元素進行排序操作

    這篇文章主要為大家詳細(xì)介紹了JQuery利用sort對DOM元素進行排序的相關(guān)資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-11-11
  • jQuery 無刷新分頁實例代碼

    jQuery 無刷新分頁實例代碼

    這篇文章介紹了jQuery 無刷新分頁實例代碼,有需要的朋友可以參考一下
    2013-11-11
  • jquery退出each循環(huán)的寫法

    jquery退出each循環(huán)的寫法

    jquery如何退出each循環(huán)的? 在回調(diào)函數(shù)里return false即可,大多數(shù)jq的方法都是如此的
    2014-02-02
  • 七個不允許錯過的jQuery小技巧

    七個不允許錯過的jQuery小技巧

    這篇文章主要介紹了七個不允許錯過的jQuery小技巧,幫助WEB開發(fā)人員開發(fā)出有創(chuàng)意和漂亮的WEB頁面,需要的朋友可以參考下
    2015-12-12
  • jquery實現(xiàn)相冊一下滑動兩次的方法

    jquery實現(xiàn)相冊一下滑動兩次的方法

    這篇文章主要介紹了jquery實現(xiàn)相冊一下滑動兩次的方法,是非常實用的圖片特效技巧,需要的朋友可以參考下
    2015-02-02
  • jQuery中unwrap()方法用法實例

    jQuery中unwrap()方法用法實例

    這篇文章主要介紹了jQuery中unwrap()方法用法,實例分析了unwrap()方法的定義、功能及移除匹配元素父元素的使用技巧,需要的朋友可以參考下
    2015-01-01
  • jquery獲取被勾選的checked(選中)的那一行的3列和4列的值

    jquery獲取被勾選的checked(選中)的那一行的3列和4列的值

    大家可能會遇到這種需求通過jquery獲取被勾選的checked的那一行的3列和4列的值,具體的實現(xiàn)如下,感興趣的朋友可以參考下哈,希望對大家有所幫助
    2013-07-07
  • 如何使用jQuery操作Cookies方法解析

    如何使用jQuery操作Cookies方法解析

    這篇文章主要介紹了如何使用jQuery操作Cookies方法解析,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2020-09-09

最新評論