jqueryjcarousellite

jCarousel Lite Uncaught TypeError: Object [object Object] has no method 'jCarouselLite'


I've followed this http://www.gmarwaha.com/jquery/jcarousellite/#install through every step of the way, and can't seem to get any joy.

I've checked that the scripts are links and responding they all seem to be view-able in the debugger so I assume its nothing to do with that.

Any help to get this up and running would be great, Here is the website I'm trying to get it to work on and keep getting this error in the console:

Uncaught TypeError: Object [object Object] has no method 'jCarouselLite'

http://goo.gl/58Ds2

Thanks


Solution

  • You must include the jQuery library which, I've checked, is not in the correct spot on that page. You must include the JQ library before any script that uses it. Either:

    Pop this at the top of your page and delete line 21 (your current script)

    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    

    OR move

    <script type="text/javascript" src="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/js/jcarousellite.js"></script>
    

    Below line 21 in your markup.

    Your carousel script is dependent on the jquery library. If jquery is not included BEFORE your script that uses it, you will get this error. Make sure to place any jquery script declaration above any and all scripts that use/depend on it.

    Existing markup

        <script type="text/javascript" src="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/js/jcarousellite.js"></script>
            <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
            <title>Sportsrule, Sports event management and language services for sports teams, sports events and the sports industry</title>
    
            <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/style.css" media="all" />
            <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/css/nivo-slider.css" media="all" />
               <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/style.css" media="all" />
     <!--   
     <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
     -->
    
    
                <link rel="pingback" href="http://176.32.230.13/test-getextra.co.uk/xmlrpc.php" />
                <link rel='stylesheet' id='NextGEN-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />
    <link rel='stylesheet' id='contact-form-7-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=3.2.1' type='text/css' media='all' />
    <link rel='stylesheet' id='jquery.lightbox.min.css-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/wp-jquery-lightbox/styles/lightbox.min.css?ver=1.3.4' type='text/css' media='all' />
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995'></script>
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06'></script>
    

    Desired Markup

                <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
            <title>Sportsrule, Sports event management and language services for sports teams, sports events and the sports industry</title>
    
            <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/style.css" media="all" />
            <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/css/nivo-slider.css" media="all" />
               <link rel="stylesheet" type="text/css" href="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/style.css" media="all" />
     <!--   
     <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
     -->
    
    
                <link rel="pingback" href="http://176.32.230.13/test-getextra.co.uk/xmlrpc.php" />
                <link rel='stylesheet' id='NextGEN-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />
    <link rel='stylesheet' id='contact-form-7-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=3.2.1' type='text/css' media='all' />
    <link rel='stylesheet' id='jquery.lightbox.min.css-css'  href='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/wp-jquery-lightbox/styles/lightbox.min.css?ver=1.3.4' type='text/css' media='all' />
    
    <!-- MOVED TOP SCRIPT INCLUSION LINE BELOW JQUERY INCLUSION RIGHT HERE -->
    
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>
    <script type="text/javascript" src="http://176.32.230.13/test-getextra.co.uk/wp-content/themes/Sportsrule/assets/js/jcarousellite.js"></script>
    
    
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995'></script>
    <script type='text/javascript' src='http://176.32.230.13/test-getextra.co.uk/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06'></script>