我有一个带有链接的隐藏div,有一个类“myvideo”和一个播放视频的函数,但首先测试发现,从隐藏div抓取新数据到上面的div后,它不起作用,只需单击非洲上方的红色圆圈并尝试视频链接(圆圈位于任何地方只是为了演示)
我只加载 qjeury 文件和我的 js 文件,其中包含下一个链接
在线代码 http://jsfiddle.net/vXPPF/
i have a hidden div with a link has a class "myvideo" and a function to play video but testing first and found out that it's not working after grabbing new data from the hidden div to the above div just click the upper red circle in Africa and try the video link (circles are positioned anywhere just for demonstration)
I'm loading just the qjeury file and my js file that contain all data in the next link
online code http://jsfiddle.net/vXPPF/
发布评论
评论(2)
click
处理程序未绑定,因为 div 在页面加载时隐藏(不在 dom 中)。将其更改为:新小提琴: http://jsfiddle.net/vXPPF/1/
jquery
在
:http://api.jquery.com/on/The
click
handler is not bound because the div is hidden (not in the dom) on page load. Change it to:New fiddle: http://jsfiddle.net/vXPPF/1/
jquery
on
: http://api.jquery.com/on/线路应该是:
Line should be: