Error in loading jCarousel

I am currently migrating a website to WordPress from another framework. The site contains a dynamic horizontal carousel using jCarousel that shows the recent 5 posts. In the new website, I have included the script files, and have used the same script code as given in the old website. But, the dynamic jQuery part that is given by the script is not being generated. I am getting the error which says :

Uncaught TypeError: Object # has no method ‘jcarousel’

Read More

The script that is used to call the jCarousel is as follows:

<script>
jQuery(window).load(function(){

featurecarousel(jQuery('#homepage-features-carousel .homepage-carousel-primary ul'));

featurecarousel_secondary(jQuery('#homepage-features-carousel .homepage-carousel- secondary ul'));
jQuery('.carousel-image, .carousel-caption-hidden, .jcarousel- control').removeClass('disappear');

jQuery('.homepage-carousel-loading').addClass('disappear');

if(jQuery.browser.safari) {
twoday.carousel1.next();
twoday.carousel2.next();
});
</script>

The Javascript function where the error is caught is as follows:

function featurecarousel(el) {

var c = el.jcarousel({

**Uncaught TypeError: Object #<Object> has no method 'jcarousel'**
    animation: 600,
    auto: 5,
    buttonNextHTML: '<a href="#" title="Prev"><span>Next</span></a>',
    buttonPrevHTML: '<a href="#" title="Next"><span>Prev</span></a>',
    itemVisibleInCallback: {
        onBeforeAnimation: featurecarousel_itemVisibleInBefore,
        onAfterAnimation:  featurecarousel_itemVisibleInAfter
    },

    initCallback: carousel_primary_initCallback,
    scroll:1,
    wrap: 'both'
 });
 }

Please help me in debugging this issue. Am I missing anything simple and basic?
Thanks in advance

Related posts

Leave a Reply