I am currently trying to drag and drop images using jquery in monaca, but it doesn't work.
Load jquery in header
jQuery("#hogeDrag").draggable();
I'm doing this, but I can't
By the way, it doesn't work even if it's not an image
Is it related to the screen not fixed?
Thank you.
Header
<script src="js/jquery 2.1.3.min.js"></script>
<script src="js/jquery.ui.min.js">/script>
html
<divid="draggable" class="ui-wide-content">
<p>Drag me around</p>
</div>
js
$(function(){
$("#draggable").draggable();
});
css
#draggable {width:150px;height:150px;padding:0.5em;}
Thank you for your cooperation.
jquery
draggable()
is the jQuery UI method.
The jQuery UI must also be loaded.
$(function(){
$('#draggable').draggable();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"/>
<divid="draggable" style="width:100px;height:100px;background:#eeddcc;">
<p>dragme</p>
</div>
885 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
567 Who developed the "avformat-59.dll" that comes with FFmpeg?
572 Understanding How to Configure Google API Key
606 Uncaught (inpromise) Error on Electron: An object could not be cloned
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.