现在是有个这样的需求
html1:
<body>
<div id = 'hehe'>您好,csdn</div>
<iframe src='html2'><iframe/>
</body>
html2:
<body>
<button ><a href="html3">跳转...</a></button>
</body>
如何实现点击html2的button 然后html1的<div id='hehe'>您好,csdn</div>进行隐藏
我在html3用jq这样写,结果发现隐藏太慢了
$(function() {
$(window.parent.document).find("#hehe").hide();
});
有什么其他方法么
在jquery 中 有 $(selector).hide(speed,callback); ,写个回调,speed 是 隐藏的速度,可选的 speed 参数规定隐藏/显示的速度,可以取以下值:"slow"、"fast" 或毫秒。
可参考: http://www.w3school.com.cn/jquery/jquery_hide_show.asp
我也是菜鸟 Word密码忘了
hide方法可以有时间参数的,看api可以看到的。