
These two buttons are from gmail. They let you go left and right through more emails.
How do I click these buttons using javascript and jquery? I'm willing to use extra libraries if necessary. I'm trying to make a shortcut that lets me use keyboard buttons to click and go to older or newer emails.
let me know if it helps:-
$(document).keydown(function(e) {
switch(e.which) {
case 37: // left
break;
case 39: // right
break;
default: return; // exit this handler for other keys
}
e.preventDefault(); // prevent the default action (scroll / move caret)
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With