jquery - 为什么这个jquery简单的转移效果不起作用?

标签 jquery user-interface transfer

正文 html 代码:

<div style="background:yellow;width:500px;height:300px;">
    <div id="div1" style="background:red; width:100px;height:100px; float:left;"></div>
    <div id="div2" style="background:blue; width:50px;height:50px; float:right;"></div>
</div>

然后是js代码:

 $(function () {
        $("#div1").click(function () {
            $(this).effect("transfer", { to: $("#div2") }, 1000);
            //$(this).effect("shake", { times: 2 }, 200);
        });
    });

当然我已经导入了

<script type="text/javascript" src="js/jquery-ui-1.8.5.custom.min.js"></script>

网上可以看到不好的:http://jsfiddle.net/hh54188/wz2J3/

下面的“摇一摇”效果可以,但是传输不起作用 那么,如何解决这个问题?谢谢

最佳答案

来自http://docs.jquery.com/UI/Effects/Transfer

The transfer element iself has the class name "ui-effects-transfer", and needs to be styled by you, for example by adding a background or border.

这在示例中

.ui-effects-transfer { border: 2px solid black; }

关于jquery - 为什么这个jquery简单的转移效果不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4200911/

相关文章:

user-interface - 如何在 React Native 中处理不同的屏幕尺寸?

css - 如何在语义 UI 中制作 "Staggered Grid"

jquery - 如何在 Angular2 中使用 jQuery 插件?插件先运行,DOM 更新后

javascript - $(this).prop ('property' ) 与 this.property

jquery - map 中的“Rel”标签?

mysql - MSSQL 到远程 MySQL 700k 行

java - 测量使用 Java 套接字传输文件时使用的带宽

javascript - 如何使用JavaScript,jquery-ajax在&lt;input type ='file'>更改时获取所选文件的完整路径?

scala - 有没有办法让 Scala REPL 不停止 CTRL-C

WCF 大文件从服务器传输,反之亦然