【发布时间】:2015-03-26 05:41:28
【问题描述】:
jQuery(document).ready(function() {
jQuery( "li.post_link_history.current" ).click(function() {
jQuery( "div#rating-anchor" ).css( "display", "none !important" );
});
});
//或
jQuery(document).ready(function() {
if(jQuery('li.post_link_history.current').attr('class')=='current')
{
jQuery('div#rating-anchor').not(jQuery(this)).css('display','none !important');
}
});
如何“通过选择一个类,另一个 div 在 jquery 中不显示任何内容”?
【问题讨论】:
-
.css( "display", "none !important" )... ->.hide()
标签: javascript jquery jquery-plugins