mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Changing checkbox/radion display toggle to use click event
- change event wasn't fired in IE when the page didn't first have focus. click seems to overlap with change in other change scenarios (label click, tab focus + space select) so we're all good --HG-- branch : dev
This commit is contained in:
@@ -16,15 +16,9 @@
|
||||
$("[data-controllerid=" + controller.attr("id") + "]").hide();
|
||||
}
|
||||
if (controller.is(":checkbox")) {
|
||||
controller.change(function() {
|
||||
$(this).toggleWhatYouControl();
|
||||
});
|
||||
controller.click($(this).toggleWhatYouControl);
|
||||
} else if (controller.is(":radio")) {
|
||||
$("[name=" + controller.attr("name") + "]").change(function() {
|
||||
$("[name=" + $(this).attr("name") + "]").each(function() {
|
||||
$(this).toggleWhatYouControl();
|
||||
});
|
||||
});
|
||||
$("[name=" + controller.attr("name") + "]").click(function() { $("[name=" + $(this).attr("name") + "]").each($(this).toggleWhatYouControl); });
|
||||
}
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user