I have an element <ul>that opens the boot box when clicked. Double-clicking on this item launches onclick in jQuery twice
$("#email-list").on("click", ".list-group-item", function (e) {
bootbox.confirm("Send a forgotten password email to " + email + "?", function (result) {...}}
I tried using 'e.preventDefault ()'
$(document).ready(function () {
$("#email-list").dblclick(function (e) {
e.preventDefault();
});
});
I even tried to disable clicking on an element, but both failed. The boot box is still displayed twice.
$("#email-list").bind('click', function () { return false; });
$("#email-list").unbind('click');
Anyone have a suggestion?
source
share