views:

336

answers:

1

I am using the following code to make an unordered list into a carousel with jcarousel lite and jquery:

<?php echo $this->Html->script(array('jquery-1.4.2.min','jquery.easing.1.1','jcarousellite_1.0.1.pack','jquery.mousewheel.min'), array('inline' => false)); ?>

    <?php echo $this->Html->scriptStart(array('inline' => false)); ?>
        $(document).ready(function() {
            $(".mouseWheelButtons .jCarouselLite").jCarouselLite({
                btnNext: ".mouseWheelButtons .next",
                btnPrev: ".mouseWheelButtons .prev",
                mouseWheel: true,
                circular: false,
                start: 0,
                visible: 5,
                easing: "easein"
            });
        });
    <?php echo $this->Html->scriptEnd(); ?>

However I'm getting the following javascript error in firebug:

a[0] is undefined

Does anyone know what is causing the error.
I am using the packed version of jcarousel lite.

The thing is that the code worked in cakephp 1.2 but now i'm using 1.3 and I have updated the syntax using scriptstart, scriptEnd and Html->script.

A: 

OK I found what was wrong. I seems like all errors are simpler than they initially look.

Everything was set up perfectly however I had forgotten to include the list-item tags. :)

ion