<!DOCTYPE html><html lang="en"><head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Droppable - Default functionality</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.14.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/ui/1.14.2/jquery-ui.js"></script>
$( "#draggable" ).draggable();
$( "#droppable" ).droppable({
drop: function( event, ui ) {
.addClass( "ui-state-highlight" )
<div id="draggable" class="ui-widget-content">
<p>Drag me to my target</p>
<div id="droppable" class="ui-widget-header">