December 1st, 2009


1
Dec 09

Simple Tool Tip with jQuery

I saw a post that talked about how to make a simple tool tip with jQuery, but that post did not make a plugin of it. It just added the function to the global scape, meaning that it was not chainable and it would only be applied to the a element. So I took the code for the first example as a starting point and turned the first example into a plugin. So, based on the first example, here we have yet another tooltip plugin, it uses the title attribute so it is perfectly accessible to people without javascript enabled. It can be applied to any element, and it is chainable and it will also be applied to new elements on the page instead of you having to re attach it to every item that you add to the dom.

Here is the javascript:

// starting the script on page load
$().ready(function(){
	$('a').simple_tip();
});

The html:

 
<a href="#" title="This is a tooltip">I have a tool tip!</a>
 
<a href="#">I don't have a tool tip!</a>

The demo.

The code is available here:
http://code.google.com/p/jsimpletip/downloads/list

The code is licensed:
Mit and GPL v2


1
Dec 09

Daily Digest for December 1st

twitter (feed #2)
Blue Beanie Day! Support web standards! http://www.flickr.com/groups/bluebeanieday2009/pool/ #bbd2009 [SeanJA]
twitter (feed #2)
@gavinblair Please don’t ever dance like that again [SeanJA]
googlereader (feed #5)
twitter (feed #2)
http://twitpic.com/rmxdi – Wonder what this is? [SeanJA]
twitter (feed #2)
@late2game Well… it doesn’t seem to be… it could be digital… [SeanJA]
twitter (feed #2)
Stupid phone… I want more than 50 characters in my message title damnit! [SeanJA]
twitter (feed #2)
http://twitpic.com/rmyk6 – Ah something to keep my head warm. [SeanJA]
twitter (feed #2)
twitter (feed #2)
Apparently you can fly a caravan [SeanJA]
twitter (feed #2)
@zoster Bad camera phone? [SeanJA]
twitter (feed #2)
@zoster Or maybe you are a bit colour blind? [SeanJA]
twitter (feed #2)
Hmmm… don’t fly your caravan over an airport, they don’t like that [SeanJA]
twitter (feed #2)
Landing a caravan is also a bit of a problem… [SeanJA]
twitter (feed #2)
@zoster Turn down your monitor’s red gamma? [SeanJA]
twitter (feed #2)
@cssquirrel You know… I never really payed attention to the lyrics [SeanJA]
twitter (feed #2)
I hate irony. #Dexter [SeanJA]
twitter (feed #2)
Why are there now 7 hulks? http://io9.com/5412301/before-they-fall-meet-the-hulks [SeanJA]
twitter (feed #2)
My brontosaurus has escaped, keep off the streets until I can recapture it. [SeanJA]
twitter (feed #2)
Bumberry is an horrible last name [SeanJA]
twitter (feed #2)
@rtraction Aw comon… it isn’t that bad… [SeanJA]
twitter (feed #2)
@rtraction Dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun dun [SeanJA]
twitter (feed #2)
twitter (feed #2)
Not a good method no… but effective, for the most part http://www.smbc-comics.com/comics/20091130.gif [SeanJA]
twitter (feed #2)
twitter (feed #2)
People actually follow @mojitobunny? What is up with that? [SeanJA]
generic (feed #13)
generic (feed #13)
twitter (feed #2)
How do the pips stay on the collars of a Starfleet uniform? [SeanJA]
twitter (feed #2)
@24ways does not appear to work very well in Chrome (it just locks up) [SeanJA]