<div class="panel panel-default">
<div class="panel-heading">--Here should say 1--</div>
<div class="panel-body">
Panel content
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">--Here should say 2--</div>
<div class="panel-body">
Panel content
</div>
</div>
如果它在面板标题中的第1'st 2'nd 3'rd ...面板中,则应放置以下内容
$(".panel .panel-heading").append($(this).eq());
使用.html()
后跟如下函数:
$('.panel-heading').html( function ( i, old ) {
return ( i + 1 );
});
不能完全理解该语句的含义the following should put if its the 1'st 2'nd 3'rd
,是否只想为panel
元素添加内容,1st, 2nd and 3rd
甚至不仅仅存在?如果是这样的话:
$('.panel-heading').html( function ( i, old ) {
if ( i < 3 ) return ( i + 1 );
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句