Skip to content

{ Category Archives } Javascript

Bug fix for sendkeys

Fixed a bug where the selection was not set correctly (a regression from when I updated bililiteRange). It's now at version 2.2.

hotkeys with keymap

Inspired by John Resig's hotkeys, I created a version that uses the modern on, and uses an object rather than a string for the keys (which would be confused with a selector). It also uses my $.keymap codes. It's written as a plugin to $.keymap. Download the code. See the demo. Usage Initialize it with [...]

Github!

Well, I've finally decided to join the 21st century and get my projects on github. Some of them are useful enough that others have expressed an interest in extending them, and it will force me to have the discipline to use version control consistently. The projects I have on there are: bililiteRangeIncludes the original bililiteRange [...]

Highlighting textareas

I liked the hack that I used in the bililiteRange utilities demo to highlight the ranges in a textarea: creating a "shadow" preelement and using that to set the background of the desired text. It's based on this trick (explained in a ddforum post) by someone with a screen name of Trinithis. I put it [...]

Parsing keydown events

Updated 2013-03-20 to include the hotkeys plugin. I've been playing around with creating an online editor, and one thing it needs is keyboard shortcuts. Control keys and the like don't register keypress events, so I have to use keydown to get the event.which (and I have to use jQuery to normalize that across browsers), and [...]

Scrolling to Cross-browser Ranges

One thing I wanted to add to my bililiteRange was the ability to scroll the range into view without changing the selection. As with all things having to do with ranges, there's no consistent way to do it, and Internet Explorer does it best (this is the only time you'll hear me say that).

bililiteRange Plugins

I created a collection of useful plugins for my bililiteRange, for more sophisticated manipulations. Now you can search the element with a regular expression, and you can keep the range "live", adjusting it when the text is edited. Download the code. See the demo. (The dynamic highlighting is off by a few pixels in iOS [...]

Improved bililiteRange

I've been working on a project that uses bililiteRange a lot, so I added two improvements: plugins and events. bililiteRange.fn.myplugin = function() {}; or bililiteRange.extend({ myplugin1: function() {}, myplugin2: function(){} }); creates new functions for a bililiteRange (just like with jQuery). Also, the text method now triggers an input event on the element. Only works [...]

jsvk, a jQuery Plugin for VirtualKeyboard

I've been using Ilya Lebedev's JavaScript VirtualKeyboard for a while, and even created a small plugin to integrate it with jQuery. But I wanted to make it more jQuery-ish, so I made a new version of jsvk, the plugin to wrap Ilya's code. See a demo that allows dynamic control of keyboard layout and skin [...]

google.load('jquery') is Dead

Not sure when this happened, but google.load('jquery', '1') is frozen at 1.7.1. Now the official Google Libraries recommends loading the version explicitly: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>. That means I have to edit my pages by hand every time they come out with a new version. I suppose that makes things stabler; I don't upgrade until I want [...]