You should make following settings in jQuery Easy to work:
Enable jQuery: jQuery + jQuery UI
Both versions for jQuery and jQuery Ui should match - for example 1.8
Make sure you have Theme for jQuery UI - this will ensure jQuery style sheet is loaded.
Remove any style declarations from code example posted in your question and make all of them inline like:
<div style="width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; background-color: #eeeaaa; display: inline-block;" id="draggable" class="ui-widget-content">
<p>Drag me to my target</p>
</div>
<div style=" width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; background-color: #eeeeee;" id="droppable" class="ui-widget-header">
<p>Drop here</p>
</div>
Otherwise you will have <style>
tags inside body
section, which is not advisable - see here.
(You can place styles in a css file as well.)
Script should be modified slightly as per this advice:
<script>
jQuery(document).ready(function($) {
jQuery( "#draggable" ).draggable();
jQuery( "#droppable" ).droppable({
drop: function( event, ui ) {
jQuery( this )
.addClass( "ui-state-highlight" )
.find( "p" )
.html( "Dropped!" );
}
});
});
</script>
Script is OK to be included in the Custom HTML module even within div tags from Joomla.
Make sure your Joomla editor do not strips JS code when saving.
Clean Joomla cache and reload.
Check browser console for errors.