doc
Usage
The uncompressed source code is heavily documented. After reading this synopsis, that would be a good place to look.
Initialisation
By default, jQWidon’t will initialise when $(document).ready() is t
riggered, using the plugin on all
heading elements (ie.
h1 through
h6). You can stop this behaviour by $.jqwidont.auto(false)ing before $(document).ready() is triggered. If you subsequently wish to use the plugin’s default behaviour you can use $.jqwidont.init().
var auto = $.jqwidont.auto(); // is automatic initialisation enabled?
$.jqwidont.auto(false); // disable it
$.jqwidont.init(); // perform the default behaviour
De-widowing elements
You can attempt to use the plugin on any element that has a $(foo).html() value.
$('p').widont();
De-widowing strings
You can also use the plugin directly on a string.
var string = $.jqwidont.transform('No widows here!'); // string = 'No widows here!'