1 2 3 4 5 6 7 8 9 10
$(function() { $("input[type=checkbox]").click(function() { var checked = this.checked if (checked) { $("~ div", $(this).parents("div")).show() }else{ $("~ div", $(this).parents("div")).hide() } }); });
selector from $(this) context