Why doesn't this jquery code work?
问题 I have this code in my application.js file, but it doesn't seem to work: $("#video_div img").click(function() { $("div.embed").toggle(); }); Here's the HTML my browser sees: <div id="video_div"> <img src="http://i3.ytimg.com/vi/fTWpHknumdg/hqdefault.jpg" style="width: 200px; "> <div class="embed"> <object width="300" height="194"><param name="wmode" value="opaque"><param name="movie" value="http://www.youtube.com/v/fTWpHknumdg?version=3"> <param name="allowFullScreen" value="true"> <param