开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜