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