E
E
Elena Vakhrusheva2018-02-13 13:40:45
css
Elena Vakhrusheva, 2018-02-13 13:40:45

How to make the jQWidon't plugin work?

I downloaded the plugin, connected it, but it does not work.
Does it need to be initialized somehow?
Tell me plz ..

Or how to remove hanging lines, even when resizing the browser?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksey Solovyev, 2018-02-13
@alsolovyev

doc
Usage
The uncompressed source code is heavily documented. After reading this synopsis, that would be a good place to look.
Initialization
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 behavior by $.jqwidont.auto(false)ing before $(document).ready() is triggered. If you subsequently wish to use the plugin's default behavior 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. De-widowing strings You can also use the plugin directly on a string.
var string = $.jqwidont.transform('No widows here!'); // string = 'No widows here!'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question