Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    change $ to jQuery. WordPress’ version of jquery uses no-conflict mode.

    You can also wrap your existing code in a document ready jQuery function where you alias $ to jQuery (and get around the no-conflict mode of jQuery).

    
    jQuery(document).ready( function($) {
    
        var obj = $("#drop-zone");
        obj.on('dragenter', function (e) 
        {
            e.stopPropagation();
            e.preventDefault();
            $(this).css('border', '2px solid #0B85A1');
        });
    
    });
    
    • This reply was modified 8 years, 10 months ago by ryanshoover.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress Jquery not work with own Plugin for WordPress’ is closed to new replies.