22 May

HoverAttribute jQuery plugin – afEkenholm Web Design

HoverAttribute is a jQuery plugin that allows you to make (link-)elements more dynamic by making an attribute of that element show up on hovering. This is foremost intended for <a> tags residing within full-width elements, such as headings or list entries. Amongst several options, it is possible to choose any attribute (href by default, see Usage) of a given tag.

via HoverAttribute jQuery plugin – afEkenholm Web Design. Really cool jQuery plugin, used it for a project at work where a tooltip was not the desired tool to show additional data. It works on any jQuery object and let’s display any attribute.

08 Apr

jQuery plugin: ‘autoResize’ – James Padolsey

Inspired by Jason Frame’s method, I’ve created an animating ‘autoResize’ jQuery plugin. Although it was inspired by his plugin it has a few slight differences, most notably the way in which the off-screen “testing” takes place. In his plugin (apparently inspired by Facebook’s implementation) a DIV is created off-screen and is filled with the textarea’s value whenever it changes. The height of this DIV is retrieved and then applied to the textarea. My plugin makes use of the scrollTop DOM property to gain the true height of the text and then applies that directly (or via animation) to the textarea.

via jQuery plugin: ‘autoResize’ – James Padolsey. Extremely nice jQuery plugin for auto-resizing textareas. The one issue is that on page load the plugin doesn’t calculate the size of the textarea. Reading the jQuery API docs for the Ready event it looks like a normal jQuery object can not be binded to ready, only the jQuery document core object can be.