如何使用JQuery点击后隐藏iframe?
我正在尝试设置一个简单的面板,通过外部 iframe 跟随鼠标移动。我想在点击后隐藏它。到目前为止我所得到的:
<div id="wrapper45" onclick="hideitnow(this)" style="position: absolute; opacity: 0.5; filter: alpha(opacity = 50); margin-left: -50px; z-index: 100;">
<script src="thescriptthatcallstheframe"></script>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
$( "#link" ).mousemove( function( e ) {
$( '#wrapper45' ).css( {
top: e.pageY - 50,
left: e.pageX + 25
} );
} );
} )
</script>
hideitnow 函数:
有谁知道为什么它不起作用!? 提前谢谢!
im trying to setup a simple panel that follows the mouse movements with an external iframe. And i want to hide it after its clicked. What i've got so far:
<div id="wrapper45" onclick="hideitnow(this)" style="position: absolute; opacity: 0.5; filter: alpha(opacity = 50); margin-left: -50px; z-index: 100;">
<script src="thescriptthatcallstheframe"></script>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
$( "#link" ).mousemove( function( e ) {
$( '#wrapper45' ).css( {
top: e.pageY - 50,
left: e.pageX + 25
} );
} );
} )
</script>
the hideitnow function:
<script type="text/javascript">
function hideitnow(elem){
document.getElementById(elem).style.display = 'none';
}
</script>
does anyone have a clue why its not working!?
thx in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)