fredhq/roundabout — Issue #6: Remote loading of items [data is undefined error]
Author: jopierrelerm
Created: 2012-01-16 13:34:27+00:00
State: open

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 load a second list of filtered 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' });
});
}