jakiestfu / Snap.js

A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)
http://jakiestfu.github.io/Snap.js/
5.99k stars 666 forks source link

How to have menu open on page load? #273

Closed meganlangston closed 8 years ago

meganlangston commented 8 years ago

I'm not awesome at JS and I can't for the life of me figure out how to have the menu already open by default on page load. Any tips? Thanks!

vitroz commented 8 years ago

Did you find out how?

You just need to create an instance of the component in your script area, and then call the open function. var snapper = new Snap({ element: document.getElementById('content') });

and then: snapper.open('right'); or snapper.open('left');