Every once in a while I stumble upon an API or browser setting that I can't believe ever existed. Such examples can be seen in the numerous
String.prototype properties such as
italics, and even
blink, which wrap given string text in their representative HTML tags. Bizarre.
It was recently brought to my attention the
document.designMode API: an
on|off switch that acts almost like a
contentEdible attribute for the entire document. You can toggle
designMode by simply changing the setting:
document.designMode = "on";
designMode setting on, you can edit page text, drag and drop assets, and generally cause chaos on the page. This is really nice for prototyping; I'd have loved to have known about this while doing client work.
While I see uses for this API, it does feel a bit bizarre. I'd have liked to have known the origins of this property and its use cases. Have ideas about how you'd use it? Share!
new Element Madness
The first way to create UI-driven...
When you want to keep an element in the same spot in the viewport no matter where on the page the user is, CSS's fixed-positioning functionality is what you need.
Above we set our element 2% from both the top and right hand side of the...
The jQuery homepage has a pretty suave tooltip-like effect as seen below:
Here's how to accomplish this same effect using MooTools.
The above XHTML was taken directly from the jQuery homepage -- no changes.
The above CSS has been slightly modified to match the CSS rules already...