jakiestfu / Snap.js

A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)

Home Page:http://jakiestfu.github.io/Snap.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to have menu open on page load?

meganlangston opened this issue · comments

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!

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');