roundabout icon indicating copy to clipboard operation
roundabout copied to clipboard

Remote loading of items [data is undefined error]

Open jopierrelerm opened this issue 12 years ago • 4 comments

Hi

I load the the ul list I want to create the roundabout from with a $.get and then I call .roundabout({ shape: 'square' }) ... this works the first time. As soon as I want to reload the ul list a second time with different items and call roundabout agaın ... I start getting a constant error logged as "data is undefined":

Error: data is undefined Source File: js/jquery.roundabout.js Line: 734

self = $(this), data = self.data("roundabout"), [line 734] bearing = (!data.reflect) ? data.bearing % 360 : data.bearing,

sample of what Im doing:

function loadItems() { $.get("items.aspx?cid=" + $("#hdcid").val(), function(data) { $("#content").html(data); $('#main-slider ul').roundabout({ shape: 'square' }); }); }

jopierrelerm avatar Jan 16 '12 13:01 jopierrelerm

I've been thinking about this one for a while now. I think it may be due to Roundabout already existing and then trying to re-initialize on top of old ones. Testing a couple of theories, and I should probably add a destroy method to let you clear a UL of all its Roundabout things.

fredleblanc avatar Feb 12 '12 15:02 fredleblanc

Was this issue ever resolved? I'm suffering from pretty much the same thing and I don't see a destroy method in the documentation. I'm getting the error on line 747. thanks

organicon avatar Feb 01 '13 19:02 organicon

Was this issue ever resolved?Has it added a destroy method ?

junchaohu avatar Apr 17 '14 06:04 junchaohu

There is a method to destroy the carousel?
A similar error when re-initialize on top of old ones

aofray avatar Apr 25 '14 05:04 aofray