soyjavi / QuoJS

Micro #JavaScript Library for Mobile Devices
MIT License
2.07k stars 236 forks source link

Question: Event handler #9

Closed PhilippSchreiber closed 12 years ago

PhilippSchreiber commented 12 years ago

Hey guys,

perhaps I'm just a little bit dump, but: how can I achieve this examples with QuoJS:

jQuery('textarea.note').live('keypress', function() {
    alert('keypress');
});

jQuery('textarea.note').live('keydown', function() {
    alert('keydown');
});

jQuery('textarea.note').live('keyup', function() {
    alert('keyup');
});

I tried:

$$('textarea.note').on('keyup', function() {
    alert('keyup');
});

What's wrong?!

Cheers Philipp

soyjavi commented 12 years ago

Key in mobile??? It's ambiguous no?

Enviado desde mi iPad

El 28/01/2012, a las 23:23, Philipp Schreiber reply@reply.github.com escribió:

Hey guys,

perhaps I'm just a little bit dump, but: how can I achieve this examples with QuoJS:

jQuery('textarea.note').live('keypress', function() {
   alert('keypress');
});

jQuery('textarea.note').live('keydown', function() {
   alert('keydown');
});

jQuery('textarea.note').live('keyup', function() {
   alert('keyup');
});

I tried:

$$('textarea.note').on('keyup', function() {
   alert('keyup');
});

What's wrong?!

Cheers Philipp


Reply to this email directly or view it on GitHub: https://github.com/soyjavi/QuoJS/issues/9

PhilippSchreiber commented 12 years ago

Ok, same question with change event. This doesn't work for me:

$$('textarea.note').on('change', function() {
    alert('change');
});

And by the way: What are the right events of the virtual keyboard on a mobile? On my iPad the jQuery events from my first post work.

soyjavi commented 12 years ago

Fixed! (please download new release) https://github.com/soyjavi/QuoJS/commit/2f95ec6252d81e7948c795fd8044226d7b660c2b

PhilippSchreiber commented 12 years ago

Works! Thank you!