• Resolved juliana_mae

    (@juliana_mae)


    Really happy with the plugin so far! Super clean and slick.

    I am using JCarousel Lite on a few other pages on my site. After I installed the most recent update to the plugin, my JCarousel functionality stopped working. I also installed a few other plugin updates (Akismet, More Fields, and WordPress Database Backup) but I thought I would check here first for a possible conflict. I didn’t want to load JQuery twice – I’m wondering if the change in the way you load JQuery now has affected my other pages.

    I’m a bit new to WordPress, so any help in the right direction would be really appreciated.

    JCarousel:
    http://www.julianamaeberger.com/soma/work/

    Slideshow Plugin:
    http://www.julianamaeberger.com/soma/test/

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Dalton Rooney

    (@daltonrooney)

    Hi Juliana,
    The problem is that jCarousel is loading before jQuery is loaded. You’ll need to change the load order of your scripts.

    Are you loading jCarousel directly, or using the enqueue script function? I think if you remove it from your template and put this in your functions.php, it should work again

    function load_scripts() {
        wp_register_script( 'jcarousellite', 'http://www.julianamaeberger.com/soma/wp-content/themes/Starkers/js/jcarousellite.js', false, '1.0.1', false);
        wp_enqueue_script( 'jcarousellite' );
    }    
    
    add_action('init', 'load_scripts' );
    Thread Starter juliana_mae

    (@juliana_mae)

    Hi Dalton,

    Thanks so much for helping out with this. I added script to functions.php and they seem to be loading in the right order now – JQuery, then JCarousel.

    It’s still not working though.
    http://www.julianamaeberger.com/soma/work/

    Do you have any other suggestions?

    Juliana

    Plugin Contributor Dalton Rooney

    (@daltonrooney)

    Ah, sorry, I didn’t see the script you were using to initiate the jCarousel. WordPress loads jQuery in noconflict mode, so you’ll need to wrap your function like this:

    jQuery(document).ready(function($){
    $(".default .jCarouselLite").jCarouselLite({
            btnNext: ".default .next",
            btnPrev: ".default .prev",
    		visible: 4,
    		scroll:4,
    		speed:100
        });
    });

    (I’m pretty sure that should work!)

    Dalton

    Thread Starter juliana_mae

    (@juliana_mae)

    Noconflict mode eh? Interesting.

    That worked!

    Happy new year!

    Plugin Contributor Dalton Rooney

    (@daltonrooney)

    Yeah, using no conflict mode is smart for plugins because you never know if someone is going to have another javascript library loaded up which will cause everything to go bonkers. Of course, it’s also possible that it will cause problems like you experienced, so it’s a trade off.

    When I’m building a theme, I usually put all of my javascript into an external file, wrap all of the jQuery code with the function I used above, and then call it at the bottom of the page with the enqueue function. I think that’s generally the safest way to do it.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Portfolio Slideshow] JQuery Update Problem with JCarousel’ is closed to new replies.