2017-03-23 10 views
0

jquery draggable을 사용하여 아래의 콤보 박스로 이미지를 드래그 할 수 있습니까?콤보 상자가있는 이미지 드래그

Div를 만들고 내부에 이미지와 콤보 박스를 넣어야하는지 잘 모르겠습니다.

이미 이미지를 드래그 할 수 있지만 아래에 어떻게 콤보 박스를 넣을 수 있는지 잘 모르겠습니다.

+0

문제를 진단하거나 안내하기 전에 몇 가지 코드가 필요합니다. – frosty

답변

0

드래그 문서의 설정은 여기에 나열된 코드없이 말할 어렵지만 : 당신이 ID를 가진 요소 아래의 상자를 필요 것처럼

<!doctype html> 
 
<html lang="en"> 
 
<head> 
 
    <meta charset="utf-8"> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    <title>jQuery UI Draggable - Default functionality</title> 
 
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 
 
    <link rel="stylesheet" href="/resources/demos/style.css"> 
 
    <style> 
 
    #draggable { width: 150px; height: 150px; padding: 0.5em; } 
 
    </style> 
 
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
 
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 
 
    <script> 
 
    $(function() { 
 
    $("#draggable").draggable(); 
 
    }); 
 
    </script> 
 
</head> 
 
<body> 
 
    
 
<div id="draggable" class="ui-widget-content"> 
 
    <p>Drag me around</p> 
 
</div> 
 
    
 
    
 
</body> 
 
</html>

보인다 "draggable". $ ("#draggable") .draggable();을 사용하는 것과 같은 방식으로 상자를 삭제 가능하게 설정할 수 있습니다.

하지만 코드 예제가 도움이 될 것입니다.