darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

Redefine Sly options on reload #201

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello,

Is there a way to redefine Sly option on reload method. For example I init Sly with option startAt : 3 and after I hide elements or append elements and it always (re) startAt 3. I would like to reset this option (to 0 for example) after init for futur reload method. What is the way to do that?

lolo

darsain commented 9 years ago

I don't understand what you mean. startAt is used only at start (Sly initialization), which happens only once, when you created and initialized Sly instance. When you call reload() the current active item doesn't change.

You can change options with #set() method. The documentation on that link also lists all the options that can be changed dynamically.