Search and Top Navigation
Ticket #4915: drag-bug.html
File drag-bug.html, 0.9 KB (added by alexandros, October 16, 2009 09:47AM UTC)
an html file illustrating the problem
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/branches/dev/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/branches/dev/ui/jquery.ui.draggable.js"></script>
</head>
<body>
<div id="a" style="position: fixed; background: #000000; width: 100px; height: 100px; color: white;">Drag Me</div>
<script type="text/javascript">
document.getElementById("a").style.top="20px";
document.getElementById("a").style.right="20px";
$("#a").draggable({
stop: function(){
document.getElementById("a").style.top="0px";
document.getElementById("a").style.right="0px";
alert("a.style.right: " + document.getElementById("a").style.right);
}
});
</script>
</body>
</html>
Download in other formats:
Original Format
File drag-bug.html, 0.9 KB (added by alexandros, October 16, 2009 09:47AM UTC)
an html file illustrating the problem
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/branches/dev/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/branches/dev/ui/jquery.ui.draggable.js"></script>
</head>
<body>
<div id="a" style="position: fixed; background: #000000; width: 100px; height: 100px; color: white;">Drag Me</div>
<script type="text/javascript">
document.getElementById("a").style.top="20px";
document.getElementById("a").style.right="20px";
$("#a").draggable({
stop: function(){
document.getElementById("a").style.top="0px";
document.getElementById("a").style.right="0px";
alert("a.style.right: " + document.getElementById("a").style.right);
}
});
</script>
</body>
</html>