【发布时间】:2010-07-23 23:01:59
【问题描述】:
<div id="formheadtop">
<input class="checkbox" type="checkbox" /></div><div class="formbody"></div>
<div id="formheadtop">
<input class="checkbox" type="checkbox" /></div><div class="formbody"></div>
<div id="formheadtop"><input class="checkbox" type="checkbox" /></div><div class="formbody"></div>
$(function() { $('input:checkbox').live('click', function () {
if ( $(this).attr('checked') == true )
{
$(this).nextAll('.formbody:first').fadeIn();
}
else
{
$('.formbody').fadeOut();
};
});
代码不起作用。我只想淡出下一个 div.formbody。
【问题讨论】: