richardscarrott / jquery-ui-carousel

jQuery RS Carousel is a responsive and touch-enabled carousel written on top of jQuery and the jQuery UI Widget Factory providing a full and familiar API in less than 2.6kB minified and gzipped.
http://richardscarrott.github.io/jquery-ui-carousel/
192 stars 56 forks source link

JS error: Uncaught TypeError: Cannot read property 'left' of null #3

Closed voidfiles closed 13 years ago

voidfiles commented 13 years ago
            $('.screenshot-carousel .picture-holder').carousel({
                itemsPerTransition:1,
                pagination: FALSE,
                autoScroll: TRUE
            });

http://dl.dropbox.com/u/133599/Screenshots/9did.png

richardscarrott commented 13 years ago

Perhaps you can provide a link or a little more information as I can't work out what the issue is from that error. It's odd to see _getPos(), _slide() and goToItem() on the $.widget function...

richardscarrott commented 13 years ago

I'm going to consider this closed until further information can be provided.

voidfiles commented 13 years ago

Yea, basically. It was failing for two reasons. One, if there is only one picture in the frame, and you try and turn on the carousel it seemed to fail.

Second, and this is of your control, in my setup I was riping out the html, and innerHTMLing other markup so, ofcourse, the caoursel would start to break.

richardscarrott commented 13 years ago

okay, thanks, it should handle being initialised with just one item. I've reopened the issue and will investigate when I get a chance.

Also if you're removing items dynamically you might want to look into the 'refresh' method.

richardscarrott commented 13 years ago

The carousel has had a significant rewrite with v0.8 so the carousel will now handle being instantiated with 0 items or more.

With this rewrite there have been some notable changes meaning the continuous scroll extension now works however the noOfRows option has been dropped and the touch extension isn't working with the new code just yet.

http://www.richardscarrott.co.uk/assets/javascript/jquery/ui-carousel/demo/