Trigger something like click() on iOS using Javascript?
I'm developing an iOS-specific version of my site, and am looking for a way to trigger a <select>
when the user taps a different image. I'm using jQuery (and can use jQuery mobile), but am open to other options, as well. I'm stuck, and have trid triggering click(), touchStart(), and tap(), and no luck this far.
Does anybody know a relatively lightweight way to do this? Again - just when the user taps an image, that activates a <select>
, and thus shows the UIPickerView in iOS (I think that's what it's called).
Thank you!
According to quirksmode.com, iOS fires the click
event on a tap. So couldn't you use an event listener on the <img>
(or whatever tag you're enclosing the image in) to activate the select
?
精彩评论