tags:

views:

27

answers:

2
<div id=b style="width: 50px; height: 50px;background:red;margin-left:300px;"></div>

<script src="jquery-1.4.2.js" type="text/javascript"></script>

thanks

A: 

First load the jQuery UI:

<link type="text/css" href="css/themename/jquery-ui-1.7.1.custom.css" rel="Stylesheet" />   
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>

Then use jQuery UI draggable method:

<script type="text/javascript">
$(function() {
    $("#b").draggable();
});
</script>
Elzo Valugi
A: 

You can use jQuery UI draggable.

rahul