QWiPS Javascript Library, v1

This version of QWiPS Javascript Library is deprecated and not supported anymore. Most likely, it is broken or will break in the nearest future. Please consider switching to the new version.

Parsing DOM


The Qwips widget tries to parse your page after it loads. You can prevent this by calling the following function.
<script type="text/javascript" src="http://qwips.com/api/js">


Returns true if the widget has been suspended.

qwips.buttons( [(selector|DOMObject|jQObject)] )

Finds all the textareas and attaches Qwips buttons to them. Examples:
qwips.buttons();       // attach to all textareas
qwips.buttons('body'); // identical to previous

qwips.buttons('#comment');    // attach to textarea with id "comment"
qwips.buttons('.edit-field'); // attach to all textareas with class "edit-field"

qwips.buttons(document.getElementById('edit-comment')); // passing DOM-object
qwips.buttons($('.edit'));                              // passing jQuery-objects

qwips.players( [(selector|DOMObject|jQObject)] )

Finds all Qwips urls and links, and converts them into inline players
qwips.players();       // convert all urls and links
qwips.players('body'); // identical to previous

// parse element with id "my-container" and its children
// parse only elements (and its children) with class "my-players"

qwips.players(document.getElementById('players')); // passing DOM-object
qwips.players($('.players-links'));                // passing jQuery-objects
You can add class bl-no-parse to avoid parsing some links.
<a href="http://qwips.com/1abcde">Parsed to inline player</a>
<a href="http://qwips.com/9vwxyz" class="bl-no-parse">Shown as link</a>

qwips.reinit( [interval] )

Reinit QWiPS widget so DOM will be reparsed again.
qwips.reinit();       // reinit immediately
qwips.reinit(0);      // periodically reinit with default timeout (1500ms)
qwips.reinit(3000);   // periodically reinit with timeout 3000ms
Warning: periodic reinit has no effect if QWiPS widget has been suspended.


Stops periodic reinit.

qwips.anchor( anchor )

Set default anchor for record buttons. Default anchor is "BL".

Anchors scheme

Anchors scheme