Question

I've included the jQuery UI stuff that I need and the jQuery core but still the following wont work:

<div id="a" style="width: 500px; height: 500px; background-color: #F00; border: 1px solid #00F;">Click me</div>
<div id="b" style="width: 50px; height: 50px; background-color: #0F0; border: 1px solid #00F;"></div>

And

$(document).ready(function () {
    $('#a').click(function () { 
        $(this).effect(
            'transfer', 
            { to: $('#b') }, 
            1000
        ); 
    });
});​

You can find a JSFiddle example here

Was it helpful?

Solution

For effect you need jQuery UI

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css " />
<script src="http://code.jquery.com/jquery-1.8.3.js "></script> 
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js "></script>

Also you need the transfer css like

.ui-effects-transfer { border: 2px dotted gray; }

Demonstration

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top