Created
September 14, 2017 06:23
-
-
Save fubobing126/018da0cc57993ccf305ce830306a1a3b to your computer and use it in GitHub Desktop.
common
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//全选的实现 | |
$(".check-all").click(function (e) { | |
$(this).parents('.table').find('.ids').prop("checked", this.checked); | |
}); | |
$(".ids").click(function () { | |
var pel = $(this).parents('.table'); | |
var all = pel.find('.check-all'); | |
if (pel.find('input.ids').not(':checked').length > 0) | |
all.prop("checked", false); | |
else | |
all.prop("checked", true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment