I have a form with a select list that allows users to choose multiple items. I am us开发者_运维百科ing
$('#my_form select').change(validateInput);
to fire an onChange event whenever an item is selected or de-selected in my select list. It works fine on my desktop machine but the validateInput function does not run on iPad. If I change my select list to set multiple selection to be false, then the onChange event fires just fine on iPad.
Use the blur event instead. When you have a select list with multiple selection enabled, iPad uses its own native UI overlay to facilitate the multiple selection. When this UI pops-up, the select list loses focus so blur event works similar to onChange event.
More info: http://bugs.jquery.com/ticket/7309
精彩评论