Skip to content

JS Components

Nick Haskins edited this page Nov 27, 2013 · 9 revisions

Soren has quite a few JS libraries already loaded. All you need to do in most cases is instantiate the script.

Page Fader

By default any nav element within soren_push_nav() will automatically be loaded with the page fade effects. To utilize the effect add .soren-fader to any anchor element (must be outbound).

Waypoints

Instantiate Waypoints by following the docs on their site.

Parallax

Currently this is for images only. Instantiate like this:

jQuery('.my-image').parallax({
    speed: 0.15
});

Set the image as a background in a div, then use the following CSS:

background-position: center top;
background-repeat: no-repeat;
background-attachment: fixed;
.background-size(cover);

Scroll Nav

Soren loads Scroll Nav. Follow the docs on their site to instantiate, and style.

Lightbox

Soren loads Swipebox. Pass rel="my-group" on an anchor links to run in a set, and link the anchor to the image. Then add .swipebox class to anchor, and call the script like so:

jQuery(".swipebox").swipebox();  

Modal

Bootstrap modal.js is loaded by default. Call this plugin to use it following BS docs.

Clone this wiki locally