ZClip如果按钮位置改变,SWF与按钮位置不对齐 [英] ZClip SWF does not align with button position if button position changes

查看:295
本文介绍了ZClip如果按钮位置改变,SWF与按钮位置不对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用zclip / jquery代码允许复制到剪贴板。它当前连接到span按钮。它似乎使用一个swf文件的按钮提供基于闪存的副本到剪贴板功能。我的问题是,当我动态添加新的元素到页面,按钮位置向下移动,但SWF位置保持不变。有什么我可以做的有zclip按按钮吗? Zclip片段如下:

I am currently using the zclip/jquery code to allow copying to the clipboard. It is currently attached to a span button. It seems to use a swf file over the button to provide the flash based copy to clipboard feature. The problem that I have is that when I dynamically add new elements to the page, the button position moves down but the SWF position stays the same. Is there anything I can do to have the zclip "follow" the button? Zclip snippet below:

$("#copyToClip").zclip({
    path:'include/javascript/ZeroClipboard.swf',
    copy:function(){return $("#outputtext").text();}
});


推荐答案

zclip jquery show方法,而不是Zclip函数。

The zclip('show') thing actually calls the jquery show method, not the Zclip function.

另一个提示将是触发窗口调整大小或加载事件。你可以在代码中看到重定位函数是绑定到它。

An other tip would be to trigger the window resize or load event. You can see in the code the reposition function is bound to it.

      a(window).bind("load resize", function(){
        d.reposition()
      })

,我添加/删除元素到我的页面,我调用

then everytime, I add/remove element to my page, I call

$(window).trigger('reload');

这对我来说很麻烦。

这篇关于ZClip如果按钮位置改变,SWF与按钮位置不对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆