abidibo.net


Featured articles

wordevents

This is a mootools plugin which allows to listen for word typed events, and execute given callbacks if the word belongs to a given dictionary. Dictionary can be populated with words or regular expressions. Instead of listening for single chars, wordevents can listen for words (a word is considered to be a set of characters typed with a time interval minor than the digit_interval option). Callbacks functions are called passing the list of events which formed the word, the word itself and binded to the target element.

Requirements

It requires

  • mootools core >= 1.4.5

Actually it requires only some parts of it, the selector engine, the Options Mixin and the Events functions.

Features

Some options available:

target
the element to which the event listener is attached, default the document element
digit_interval
The time interval between two typed characters in order to be considered belonging to the same word, default 500ms
event_type
The keyboard event type, default 'keyup'
acceptedCode
a function used to check if the pressed key has to be considered or not. It takes the argument evt which is the event object and must return true or false.

wordevents has been tested with:

  • windows:
    - google chrome
    - firefox
    - internet explorer 9.0
  • linux:
    - chromium
    - firefox
  • mac:
    - firefox
    - safari

If you find errors, bugs or simply have some annotations or advises, please comment here or submit them to the project page hosted on github.

mootools forge documentation demo download

blog comments powered by Disqus

Categories

ajsut(1) android(3) animation(1) apple(1) applications(1) attualità(1) awr(1) bash(1) battery(1) cache(1) calculator(1) canvas(2) conky(1) css(1) css3(3) deploy(6) django(13) django-admin(3) django-filer(1) django-mptt(2) document(1) drag&drop(1) effect(1) events(1) fabric(2) fluxbox(3) forms(1) games(1) git(3) glen hansard(1) gtk(1) hdmi(1) html5(5) javascript(19) jeff(4) jquery(2) life(1) linux(2) lorempixum(1) math(1) me(2) mixin(1) mobile(2) moogallery(2) mooReadAll(2) mootools(17) mooTree(1) music(1) mysql(1) network(1) nginx(3) otto(1) patterns(2) performance(2) php(6) physics(1) pip(2) plugin(2) programming(19) python(1) referendum(1) responsive-design(2) selectors(1) sem(1) semantics(1) showcase(1) singleton(1) softpedia(1) software(1) south(2) stevejobs(1) tasker(1) testing(2) tideSDK(1) tips(8) tutorial(1) uwsgi(1) vga(1) vim(1) virtualenv(5) web(1) web design(1) webmaster(9) wordevents(1) wsgi(1) xrandr(1)