The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
SafeEnter: Trap the enter key, but not when choosing the browser's autocomplete suggestion
Fires an event when the user presses Enter, but not if the user is currently selecting from the browser's autocomplete suggestions.
To click an element when the user presses enter:
$('#myTextbox').clickOnEnter(myElement);... or handle the event yourself:
$('#myTextbox')
.listenForEnter()
.bind('pressedEnter', function()
{
// Do stuff
});Thanks to tuanvt on stackoverflow.com for the idea!
[codesnippet:2e23681e-c3a9-46ce-be93-48cc3aba2c73]
