Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="div"> Only execute javascript on click, not enter key press </div>
- $("#div").click(function () {
- /* IF ENTER KEY PRESSED, RETURN FALSE */
- $("#div").keypress(
- function(event){
- if (event.which == '13') {
- event.preventDefault();
- alert('clicked');
- }
- });
- /* Div has been clicked, continue code... */
- });
- $("#div").MOUSE_CLICK_EVENT(function () {});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement