Differences

This shows you the differences between two versions of the page.

Link to this comparison view

snapjs [2014/07/03 17:42]
snapjs [2021/04/05 11:23] (current)
Line 1: Line 1:
 +====== SnapJS ======
 +The Javascript library SnapJS can be used for side menu bar.
 +
 +Source [[https://github.com/jakiestfu/Snap.js/ | SnapJS at Github]]
 +
 +Demo [[http://jakiestfu.github.io/Snap.js/demo/apps/default.html | SnapJS]]
 +
 +===== Change Drawer Width =====
 +To change the width of the drawer the CSS //and// the Snapper instance has to be configured (maxPosition).
 +
 +<sxh css; title: snap.css>
 +.snap-drawer {
 +  width: 400px;
 +}
 +</sxh>
 +
 +<note tip>This can be overridden in you application CSS file with <code>.snap-drawer { width: 400px !important; }</code></note>
 +
 +<sxh javascript;>
 +new Snap({
 +  element: document.getElementById("snap-content"),
 +  maxPosition: 401
 +})
 +</sxh>
 +
 +{{tag>devel javascript}}