0.0.9 • Published 11 years ago

sioux-segue v0.0.9

Weekly downloads
35
License
-
Repository
github
Last release
11 years ago

sioux Segue

npm install sioux-segue

Push and modal segue for sioux. The push type will perform a right to left wind and a left to right unwind. The modal type will animate a window from the bottom when winding, and back when unwinding.

create

var Segue = require('sioux-segue');
var segue = new Segue(document.querySelector('.foo'), 'push');
// first argument: the element segue is performed on
// second argument: the type of segue 

HTML

<div class="screen">
  <div class="ui-window foo"></div>
</div>

Properties

  • state: WINDED or UNWINDED
  • available: false if it is animating
  • DURATION: the duration of the transition
  • type: the type of the segue, push or modal

Methods

.wind(contentFn, callback)

The contentFn is a function which has to return a DOM node or node list, that will be inserted into the appearing window. The callback function will be called when the animation finished.

.unwind(contentFn, callback)

In the push type same as the wind method but this will slide to the right. If the segue is modal __there is no contentFn argument just a callback.

0.0.9

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago