JQuery for mobile safari: on() fails
问题 I'm trying to change some classes on dynamically generated DOM elements for a mobile web page. My usual method, the jquery on() doesn't pick up the events properly. Neither does "delegate()" , my backup work. I'm using JQuery version "http://code.jquery.com/jquery-1.7.min.js" 回答1: The solution was to add onclick='' to the div element. Not sure why that worked, but it did. – 回答2: Instead of using the on, can't you just write the event as it is? Such as: $(document).ready(function () { }); $