keithamus/jwerty — Issue #2: jwerty.fire
Author: mmkader85
Created: 2011-10-12 03:32:28+00:00
State: open

Hi,

First of all thanks for the wonderful work.. I'm not able to get jwerty.fire to work.. In fact, im quite not understand the way it is supposed to work.. Pls see the sample below,

<pre>
<form id="myForm" name="myForm" method="post" action="/">
Go to google - ctrl+alt+g or shift+alt+g <br /><br/ >
Email : <input type="text" name="type-email" id="type-email" /> <br />
Re-Type Email : <input type="text" name="re-type-email" id="re-type-email" /> <br />
</form>
</pre>
<script type="text/javascript" src="jwerty.js"></script>
<script type="text/javascript">

jwerty.key('ctrl+alt+g/shift+alt+g', function () {
window.location = 'http://google.com.sg';
});

jwerty.key('ctrl+v',function (){
alert('Suggest you not to use paste command while re-typing email');
return false;
},'#re-type-email');

jwerty.fire('enter','input:first-child', "#myForm");
</script>

With this, i was expecting focus to be set to Email text field when enter key is pressed but its not happening... Please let me know whether i understand the fire event wrongly or is there a problem with it..

Thanks,
Abdul