jquery - ENTER (how to block, getting bottom row) -


i have div named "block". editable div (contenteditable="true") when i'm focused div, if press enter cursor gets bottom row. want block thing. want remove getting bottom row function when press enter.

is there anyway this?

you can prevent listening keydown event , return false.

// replace '#block' element id  $('#block').on('keydown', function(e){      // e.which returns keycode key pressed      // '13' enter key.     if(e.which == 13)         return false;  }); 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -