Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 div 容器,里面有 javascript 代码,我不能将代码移到外面,所以我能做些什么来防止第二次运行这个 fot 链接到小提琴。 http://jsfiddle.net/f5caT/4/
如果警报只应在页面加载时显示,那么您只需在为 div 设置动画之前删除脚本块
http://jsfiddle.net/f5caT/8/
$(function(){ $('button').click(function(e){ $('#hidden') .find("script").remove().end() .show('slide',1000); }); });