0
朋友你好下面是我的代码的.next()和.addClass()jQuery中不工作
HTML
<ul>
<li>
<div class="input"><input name="" type="checkbox" value="" id="a"/></div>
<div >Name of the survey goes here | 35 Points - <span>Begin Survey</span></div>
</li>
</ul>
jQuery的
<script>
$(document).ready(function(){
$('#a').click(function(){
$(this).next('div').addClass('.check_clicked');
})
})
</script>
CSS
.check_clicked
{
text-decoration:line-through;
color:#b6a7a7;
}
我只是想检查复选框的值那么类.check_clicked
应该应用于下一个格
先生,这是正确的。 – sp00m 2012-04-24 07:48:36
感谢它现在的工作...... – Kamal 2012-04-24 07:53:16
太好了 - 请不要忘记在15分钟的延迟结束后再接受答案。 – ThiefMaster 2012-04-24 07:56:32