@love_andrey
начинающий верстальщик

Как заставить работать плагин jQWidon’t?

Я скачала плагин, подключила, но он не работает.
Его надо как-то еще инициализировать ?
Подскажите плз..

Или как убрать висячие строки, даже при ресайзе браузера?
  • Вопрос задан
  • 44 просмотра
Пригласить эксперта
Ответы на вопрос 1
alsolovyev
@alsolovyev
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 triggered, 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!'
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы