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.

AJAX support

You can make QWiPS work with AJAX updates of your pages. Some of these functions can help you.

qwips.getToken( (selector|DOMObject|jQObject) )

Returns QWiP's token, associated with specified textarea (or undefined, if QWiP has not been recorded yet).
// returns token of recorder QWiP associated with textarea with id "mytextarea"

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

Close all recorder players in specified context (without deleting QWiPs).
// close all recorder players
// close recorder players inside elements with class "comments"

qwips.cleanupByToken( token )

Close recorder player with specified QWiP's token (without deleting QWiPs).
qwips.cleanupByToken('1abcde'); // close recorder player with '1abcde' QWiP's token


This function should be called in case you inject widget after DOM parsed and/or window loaded.
/* function 'window.qwips_loaded' will be called automatically
   after QWiPS widget completely init */
window.qwips_loaded = function() {
  qwips.settings({ playerStyle: { "avatar":1 } });
// inject QWiPS widget into page