[英]ZeroClipBoard forceHandCursor? Global config not working
Hi I just started using ZeroClipBoard, so I am still acclimating myself with it. 嗨,我刚开始使用ZeroClipBoard,所以我仍然适应它。 I have it working however I can not for the life of me get the hand cursor icon on hover of the elements.
我有它工作,但我不能为我的生活得到元素悬停的手形光标图标。 I am also getting an error in the console everytime i hover a clip element: Uncaught Error: Error calling method on NPObject.
我每次悬停一个剪辑元素时都会在控制台中出现错误:未捕获错误:在NPObject上调用方法时出错。
Here is a link to the project: http://git-cheatsheet.com/ 以下是该项目的链接: http : //git-cheatsheet.com/
Here is my code: 这是我的代码:
ZeroClipboard.config({ forceHandCursor: true });
var client = new ZeroClipboard( gitSnip );
client.on( "ready", function( readyEvent ) {
client.on( "copy", function (event) {
var clipboard = event.clipboardData;
clipboard.setData( "text/plain" );
});
client.on( "aftercopy", function( event ) {
$(".overlay").fadeIn().addClass('active');
setTimeout(function(){
$(".overlay").fadeOut().removeClass('active');
},1200);
});
});
To customise the button with CSS you can't use the usual pseudo-classes of :hover or :active you have to use the zeroclipboard sub-classes: .zeroclipboard-is-hover and .zeroclipboard-is-active . 要使用CSS自定义按钮,您不能使用通常的伪类:hover或:active您必须使用zeroclipboard子类:.zeroclipboard-is-hover和.zeroclipboard-is-active。 This is because you have the clear Flash element over the top which is blocking direct access to the underlying button.
这是因为您在顶部有清晰的Flash元素,阻止了对底层按钮的直接访问。
See the zeroclipboard documentation in more detail under CSS Effects at https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md 有关详细信息,请参阅CSS效果下的zeroclipboard文档, 网址为https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md
As to your error in the console check out this answer Uncaught Error: Error calling method on NPObject 至于您在控制台中的错误,请查看此答案Uncaught Error:错误调用NPObject上的方法
这个css使用ZeroClipboard v2.1.6为我工作:
.zeroclipboard-is-hover { cursor:pointer; }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.