【发布时间】:2015-08-11 17:54:19
【问题描述】:
我想更改我的<p> 标签样式。
我的html代码:
<input type="checkbox"><p> paragraph</p>
jQuery:
$('ul.list').on("click", "input", function() {
if ( $(this).is(':checked') ) {
$(this).find('p').css("text-decoration", "line-through");
} else {
$(this).find('p').css("text-decoration", "none");
}
});
【问题讨论】:
标签: jquery checkbox input selector