yairEO/fancyInput — pull request #40 by JudeOsborn (2014-02-26 23:12:00+00:00)
Title: Got rid of offsetLeft error when charsToRemove is zero length and added ...

...a destroy parameter to clear events.

When hitting backspace on an empty input box I was getting "Uncaught TypeError: Cannot read property 'offsetLeft' of undefined" on line 166. So I'm checking charsToRemove for length now.

I also added a parameter called "dest" and a function called "destroy" that let you remove all events. This was needed for a project where fancyInput had to be initialized and de-initialized regular. Without this, the key events were duplicating, causing characters to be typed multiple times. So simply setting a parameter to true clears the events immediately, like this:

$someInput.fancyInput(true);