2011-03-23 3 views

답변

8

이 밖으로 시도 : 여기 http://jsfiddle.net/6JtMp/

코드 것 :

<style> 
    #draggable { width: 150px; height: 150px; padding: 0.5em; background-color: green; } 
    </style> 
    <script> 
    $(function() { 
     $("#draggable").draggable({ 
      start: function(event, ui) { $(this).css("height",10); }, 
      stop: function(event, ui) { $(this).css("height",150); }   
     }); 
    }); 
    </script> 



<div class="demo"> 

<div id="draggable" class="ui-widget-content"> 
    <p>Drag me around</p> 
</div> 

</div><!-- End demo --> 
1

무엇 drag에 대한 다음은 API 문서는?

드래그 마우스가 현재의 이동이 발생하기 직전의 드래그하는 동안 이동하는 동안 트리거 (이벤트, UI)

.

$("#draggable").draggable({ 
    drag: function(event, ui) { 
     // do something while dragging 
    } 
}); 
:

는 그냥 드래그 콜백을 지정
관련 문제