Closed polarblau closed 12 years ago
Ah, sorry, missed this comment when replying to the pull request (regarding missing test). You can "mock" any kind of jQuery event e.g. like this (no need for an extra dependency):
ENTER_EVENT = $.Event 'keypress', 'which': 13
Then use it like so:
$('#my-input').trigger ENTER_EVENT
If you want to take a crack at writing a test for this, I'd appreciate it. I'm happy to help.
Also not sure if this shouldn't be a keyup
event rather.
Hello. I wrote this feature. Unfortunately without tests. I'm probably able to write tests with some another dependency (https://github.com/jquery/jquery-ui/blob/master/tests/jquery.simulate.js). I'm coffee newbie, so please review.