WordPress.org

Ready to get started?Download WordPress

Forums

WP Jump Menu
Add jquery noconflict in js files (4 posts)

  1. sireneweb
    Member
    Posted 11 months ago #

    Hi,
    i noticed a lot of conflict bug when you use jump menu with other plugins.
    Could you add jquery noconflict to solve this bug ?

    Check my hack in jquery.ui.position at first line :

    jQuery.noConflict();
     (function( $, undefined ) {

    at the end :

    }( jQuery ));

    Why you don't use the jquery.ui.position.min.js in s\wordpress\wp-includes\js\jquery\ui\ ?
    You will keep everytime the compatibility with the core
    http://wordpress.org/extend/plugins/wp-jump-menu/

  2. sireneweb
    Member
    Posted 11 months ago #

    In fact when you check the source code, you'll see the jquery.ui.position is alread loaded by wordpress core, maybe add a condition check to load the file if isn't loaded.

    Replace

    wp_enqueue_script( 'wpjm-jquery-ui-position' );

    by

    wp_enqueue_script( 'jquery-ui-position' );
  3. jkrill
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Sireneweb,

    Thanks for this. You are probably right about these things, I just have not had any time to revisit the plugin lately to improve the code. I feel like I know way more now than when I first wrote it, and could greatly improve performance and things like what you mentioned, but I haven't been able to find the time to get in there.

    Hopefully in the next couple months I can carve out a little time to work on this.

    Jim

  4. sireneweb
    Member
    Posted 11 months ago #

    New fix for Gravity forms :

    in wp-jump-menu.php for admin_bar_menu() function, add this to fix bug with chosen, because chosen isn't loaded when you edit form for gravity

    if ($this->options['useChosen'] == 'true') {
                        $html .= ".chosen({position:'".$this->options['position']."'})";
                    }

    Replace by

    if(wp_script_is('chosenjs','queue')){
                    if ($this->options['useChosen'] == 'true') {
                        $html .= ".chosen({position:'".$this->options['position']."'})";
                    }
                }

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.