gpt4 book ai didi

javascript - 添加双击以 Draggable/droppable::javascript

转载 作者:行者123 更新时间:2023-11-28 08:40:27 24 4
gpt4 key购买 nike

我有两个并排的框,即使代码有效,我想添加双击动画繁荣。

here is the jsfiddle

http://jsfiddle.net/2Kqse/

我将如何在已有的代码中添加双击,以便通过拖放双击将图标动画化到框中。

也许可以用css来完成?有什么想法吗?

谢谢:)

最佳答案

我会做这样的事情。您可以更改 jQuery 动画的类型。您可以查看此链接以查看不同类型的动画: http://api.jquery.com/show/希望这会有所帮助。

$(".draggable").draggable({
revert: "invalid"
})
.dblclick(function(){
$('.BtnReport').show();
if ($(this).parent().attr("id") != "drop") {
$(this).hide().appendTo("#drop").show('slow');
} else {
$(this).hide().appendTo("#grid").show('slow');
}
});

http://jsfiddle.net/M8qyF/

关于javascript - 添加双击以 Draggable/droppable::javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20552227/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com