Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 number spinbox controls not triggering a change event?

We are currently using jQuery to trigger a recalculation on a form input field. Using HTML5 we get nice spinboxes in Safari (at least on 5.0.3 Mac). However updating the field with the spinbox controls doesn't seem to trigger a change event at all. It's like the field hasn't been updated. Is this just an oversight in WebKit? Or are there ways around this?

Edit: Changing the spinbox doesn't even trigger an input event.

like image 411
Erik Veland Avatar asked Nov 06 '22 03:11

Erik Veland


1 Answers

You want to use the oninput event. Use something like $("...").bind("input", fn);.

See http://msdn.microsoft.com/en-us/library/gg592978(VS.85).aspx

like image 88
gilly3 Avatar answered Nov 14 '22 18:11

gilly3