list of submit-sharpadd_form when ctrl+s or command+s
is pressed
$(window).bind("keydown", function(event) {
if (event.ctrlKey || event.metaKey) {
switch (String.fromCharCode(event.which).toLowerCase()) {
case "s":
event.preventDefault();
$("-sharpadd_form").submit();
break;
}
}
});
my jquery is this connection:
$("-sharpadd_form").submit(function(e){
e.preventDefault();
....
but there is a problem
I have another event is to use click to send submit (he communicates with ajax)
$(".save_btn_v2").click(function(e){
e.preventDefault();
...
so how do I realize that
can cancel the $(".save _ btn_v2"). Click
event after pressing ctrl+s or command+s? And then let him run down by himself