我正在学习Jquery,因此请在这里接受,DIVs
如果复选框为check>,我想隐藏/删除内容>
取消选中 复选框时,我希望DIVs
内容重新出现(在选中的复选框中隐藏)。
我设法解决了问题的第1部分,隐藏了内容,但是我坚持让内容重新出现。
任何帮助表示赞赏
$(function() {
$('.return_to_pickup_location').click(function() { //fire when the button is clicked
$('form input:checkbox').each(function() {
var checkbox = $(this);
if(checkbox.is(':checked'))
$('.returnLocation').hide("slow");
else
$('.returnLocation').show("slow");
});
});
});
只需将show添加到else块中的元素即可。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句