Open In App
Related Articles

jQWidgets jqxDragDrop dropTargetEnter Event

Improve Article
Save Article
Like Article

jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxDragDrop is used to represent a jQuery drag and drop widget that is used to make any DOM element draggable. It can be used in combination with many widgets like jqxTree, jqxGrid, jqxListBox and etc.

The dropTargetEnter event is triggered while the item is over the drop target for the first time.


$('#jqxDragDrop').on('dropTargetEnter ', function () {
  // Code here.

Linked Files: Download jQWidgets from the link. In the HTML file, locate the script files in the downloaded folder.

<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqx-all.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdragdrop.js”></script>

Example: The below example illustrates the jqxDragDrop dropTargetEnter event in jQWidgets.


<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" 
          type="text/css" />
    <script type="text/javascript"
    <script type="text/javascript"
    <script type="text/javascript"
    <script type="text/javascript"
<body class='default'>
        <h1 style="color:green;">
        <h3>jQWidgets jqxDragDrop dropTargetEnter event</h3>
        <div id="dragID" 
                    border:1px solid black;
            <div style="display:flex;
                Drag me
        <div id="dropID"  
                    border:1px solid black;">
            <div style="display:flex;
                Drop here
    <script type="text/javascript">
        $(document).ready(function() {
                dropTarget: "#dropID"
            $('#dragID').on('dropTargetEnter', function (event) {
                $("#dropID").css({background: "red"});



Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 28 Nov, 2021
Like Article
Save Article
Similar Reads
Complete Tutorials