I have this right now:
$('#markAll').live('click', function () {
checkAll(true, $('.cbPick'));
$('#markAll').text("");
$('#markAll').prepend("<strong>Unmark all</strong>");
});
When i press #markAll, it marks every checkbox with .cbPick, and then it changes the text from (previous “Mark all”) to “Unmark alL”. Now if you press again on “unmark all” nothing happens. And i wish to if you click on “Unmark all” then it should do:
checkAll(false, $('.cbPick'));
How can i do that?
1 Answer