Browse Source

allow a JSON object be used on init()

pull/20/head
Ivar Vong 13 years ago
parent
commit
5baa49ebac
  1. 2
      timeline.js

2
timeline.js

@ -3686,6 +3686,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
} else { } else {
if (type.of(d) == "string") { if (type.of(d) == "string") {
VMM.Timeline.DataObj.getData(d); VMM.Timeline.DataObj.getData(d);
} else if (type.of(d) == 'object' && d.timeline.type == "default") { // we got a JSON object passed in, let's go!
VMM.fireEvent(global, "DATAREADY", d);
} else { } else {
VMM.Timeline.DataObj.getData(html_string); VMM.Timeline.DataObj.getData(html_string);
//VMM.attachElement(element, content); //VMM.attachElement(element, content);

Loading…
Cancel
Save