timeglider / jquery_widget

Timeglider's JS Widget component. See README for details.
193 stars 41 forks source link

Reset tg1 without reloading the page #62

Open kwoxer opened 9 years ago

kwoxer commented 9 years ago

So everything works well. I load my json with tg1 = $("#timelinearea").timeline({... all is fine.

But I would like to load another json file without reloading the page. So I was thinking about tg1 = {}

But that does not work properly. I don't get any error. But in the console I see that he is adding layer after layer. So at the second loadage instead of one Array [ "titlebar:", "hiddenBar" ] I have 2 of them and so on.

I can also see in the presentation that there are many layers because the text is getting bold because of the different text layers.

So the timeline is not correctly resetted in that way. So my question is how can I properly reset the timeline. I know I could save all data to one json, but I don't like it that way.

I would like to load another timeline from another json file without reloading the page. That's it =)