jQuery UI - 요소를 끌어서놓기
.NET프로그래밍/jQuery 1.3.2 2009. 11. 17. 13:35 |
[Droppable.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>
<style type="text/css">
.opa { opacity:1.0; }
</style>
<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({ opacity:"0.3" }); // 끄는 동안만 불투명도 주기
$('div').droppable({
accept: "img", // 드롭시킬 대상 요소
drop: function (event, ui) {
$(this).append("끌어서놓기 됨");
}
});
});
</script>
</head>
<body>
<img src="../images/ue.png" />
<div style="position:absolute;top:100px;left:150px;
border:1px solid gray;width:160px;height:160px;
text-align:center;"></div>
</body>
</html>
-------------------------------------------------------------------------------------
[실행결과]
* 참고 -> "Internet Explorer" 웹 브라우저에서만 "불투명도" 화면이 보인다.
'.NET프로그래밍 > jQuery 1.3.2' 카테고리의 다른 글
jQuery UI - 개체 선택(Selectable) (0) | 2009.11.17 |
---|---|
jQuery UI - 개체 정렬(sortable) (0) | 2009.11.17 |
jQuery UI - 요소를 드래그하기(끌기) (0) | 2009.11.17 |
jQuery UI 다운로드 및 설치 그리고 활용 (0) | 2009.11.17 |
Utilities - 문자열 매개변수를 쿼리스트링으로 변경 (0) | 2009.11.17 |