Archive | January 2011

Disable autocomplete for keyup on jQuery

There’s an event I cannot handle on jQuery: the Firefox autocomplete on textarea.

If you have to use the keyup event for a string match on textarea content, you have to exclude autocompletion, that is out of keyup logic.

To do this, simply add:

$(‘#myelement’).attr(‘autocomplete’, ‘off’);

to your jQuery. Autocomplete will be disabled and the unhandled event will not fire.

See also:

Follow

Get every new post delivered to your Inbox.