如何隱藏附加li
元素沒有標識或類如何隱藏沒有標識或類的appeed li元素
這是我的代碼。
<form action="" method="post" id="blog-node-form">
<ul class="vertical-tabs-list">`enter code here`
<li>
<a href="#"><strong>Menu settings</strong></a>
</li>
<li>
<a href="#"><strong>URL path settings</strong></a>
</li>
<li>
<a href="#"><strong>Revision information</strong></a>
</li>
<li>
<a href="#"><strong>Authoring information</strong></a>
</li>
<li>
<a href="#"><strong>Publishing options</strong></a>
</li>
</ul>
</form>
jQuery("#blog-node-form").on('each','ul.vertical-tabs-list li',function(){
if(jQuery(this).find('strong:contains("Menu settings")').length>0 || jQuery(this).find('strong:contains("Authoring information")').length>0)
{
jQuery("#edit-menu").hide();
jQuery(this).hide();
}
});
這裏我試圖隱藏特定的li
。
ul
被添加到我的頁面使用ajax。
顯示你的HTML代碼很好。 – Bharat
你可以加入這個掠奪者? – Sharmila
什麼是'.on('each','? – Satpal