jquery-typing

WebJar for jquery-typing

Лицензия

Лицензия

Public Domain
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

github-com-ccakes-jquery-typing
Последняя версия

Последняя версия

0.3.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

jquery-typing
WebJar for jquery-typing
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/ccakes/jquery-typing

Скачать github-com-ccakes-jquery-typing

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-ccakes-jquery-typing/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-ccakes-jquery-typing</artifactId>
    <version>0.3.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-ccakes-jquery-typing/
implementation 'org.webjars.bower:github-com-ccakes-jquery-typing:0.3.3'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-ccakes-jquery-typing/
implementation ("org.webjars.bower:github-com-ccakes-jquery-typing:0.3.3")
'org.webjars.bower:github-com-ccakes-jquery-typing:jar:0.3.3'
<dependency org="org.webjars.bower" name="github-com-ccakes-jquery-typing" rev="0.3.3">
  <artifact name="github-com-ccakes-jquery-typing" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-ccakes-jquery-typing', version='0.3.3')
)
libraryDependencies += "org.webjars.bower" % "github-com-ccakes-jquery-typing" % "0.3.3"
[org.webjars.bower/github-com-ccakes-jquery-typing "0.3.3"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

jQuery-typing with events and data-api support

Assign callbacks for started/stopped typing events. This version supports events and data-api and is backwards compatible with original version by narf.

Usage (events automatically attached just-in-time based on the data API - bootstrap style)

$(body).bind('typing:start', ':input', function(event) { $(this).css('background', '#fa0'); }); $(body).bind('typing:start', ':input', function(event) { $(this).css('background', '#f00'); });

Alternative Usage

$(':text').typing({
    start: function (event, $elem) {
        $elem.css('background', '#fa0');
    },
    stop: function (event, $elem) {
        $elem.css('background', '#f00');
    },
    delay: 400
});

Add data-provide="typing" attribute to your input and it will auto-magically start triggering typing:start and typing:stop events - you can treat these as ony other DOM events. This comes handy when working with frameworks like Backbone JS.

typing command takes key-value object with start, stop and delay keys. They are all optional, so you can either pass only start callback, stop callback, stop callback and delay time, or everything.

delay is amount of time the plugin waits for another keypress before judging that typing has stopped; it is expressed in milliseconds and defaults to 400. Regardless of delay's value, the stop callback is called immediately when blur event occurs.

Callbacks are passed two arguments: event that caused callback execution and jQuery object for matched element. Possible events are keypress or keydown for start callbacks and keyup or blur for stop callbacks.

Demo

Visit http://tnajdek.github.io/jquery-typing/

Download

Get production version from & development version visit GitHub.

Meta

jQuery-typing is written by Maciej Konieczny and uses semantic versioning for release numbering. Everything in plugin/ directory is released into the public domain.

jQuery-typing has been tweaked by Tom Najdek to support data-api and trigger events.

Версии библиотеки

Версия
0.3.3