Support » How-To and Troubleshooting » Two JQuery-based plugins conflicting

Two JQuery-based plugins conflicting

  • I am trying to run two JQuery-based plugins on the same page — the Nivo Slider and the JJ NextGen Carousel.

    When I try to run them both, the Nivo Slider breaks — though it is still semi-functional, its transitions from slide to slide no longer work and its prev/next arrows don’t work.

    I believe this is because I am calling JQuery twice. I’m not sure how to avoid this situation, though. Does anyone have any ideas?

    I am calling the JQuery for the Nivo Slider in the header.php file, using this code:

    <?php wp_enqueue_script('jquery'); ?>
    <?php wp_head(); ?>

    Followed by this set-up of the JQuery:

    <script type="text/javascript">
    jQuery(window).load(function() {

    For the NextGen Carousel, the plugin calls the JQuery using this code in its own function.php file:

    function WPJJNGGJ_CAROUSEL_enqueue_scripts()
      if( !is_admin() )
        wp_enqueue_script ( 'jquery');
        wp_enqueue_script( 'jquery-jcarousel', WPJJNGGJ_CAROUSEL_plugin_url( 'script/jquery.jcarousel.min.js' ), array('jquery'), '', false );
        wp_enqueue_script( 'jquery-shuffle', WPJJNGGJ_CAROUSEL_plugin_url( 'script/jquery.jj_ngg_shuffle.js' ), array('jquery'), '', false );

    Any thoughts would be greatly appreciated.

  • The topic ‘Two JQuery-based plugins conflicting’ is closed to new replies.