• I developed a JQuery Plugin.

    These Plugin isn’t Compatible with the WordPress Query Version.

    My Drag and Drop do’nt work.
    If i Register a Query Version in WordPress. The Drag And Drop Works. But it gaves Compatible Error with WordPress. How can I solve this

    var obj = $("#drop-zone");
    obj.on('dragenter', function (e) 
    {
        e.stopPropagation();
        e.preventDefault();
        $(this).css('border', '2px solid #0B85A1');
    });

    I have the answer: https://premium.wpmudev.org/blog/adding-jquery-scripts-wordpress/

    • This topic was modified 9 years, 4 months ago by darknet2.
    • This topic was modified 9 years, 4 months ago by darknet2.
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 9 years, 4 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.