.NET프로그래밍/jQuery 1.3.2
jQuery UI - 요소를 드래그하기(끌기)
holland14
2009. 11. 17. 13:17
[Draggable.htm]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>요소를 드래그하기(끌기)</title>
<script src="../js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script src="../js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
//$('img').draggable(); // 끌기 가능
//$('img').draggable({axis:"x"}); // x좌표로만 이동
$('img').draggable({ revert: true });
});
</script>
</head>
<body>
<img src="../images/ue.png" />
</body>
</html>
-------------------------------------------------------------------------------------
[실행결과]