$(document).on("keydown", function (e) {
if (e.which === 8 && !$(e.target).is("input:not([readonly]):not([type=radio]):not([type=checkbox]), textarea, [contentEditable], [contentEditable=true]")) {
e.preventDefault();
}
});
Created
September 24, 2015 05:53
-
-
Save dogrocker/5ea042a04c419867a757 to your computer and use it in GitHub Desktop.
Prevent BACKSPACE from navigating back with jQuery (Like Google's Homepage)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment