Tool tips for the images

10 views
Skip to first unread message

Alistair

unread,
Feb 11, 2010, 10:48:27 AM2/11/10
to jQuery checkbox
The addition of:

title="'+ $ch.attr('title')

to the following line:

ch.wrapper = $('<span class="' + settings.cls + ' '+ $ch.attr('id') +
'"><span class="mark"><img src="' + settings.empty + '" title="'+
$ch.attr('title') + '" /></span></span>');

means it can inherit the title attribute of the parent input. This
only makes sense if there is one, but it enabled me to fulfil a
requirement off putting tooltips on the images. Including this in a
conditional way would be cool.

If you want to see it in action (using the icons to filter different
modes of transport from a travel search result), visit:

http://www.zoombu.co.uk/ski

Cheers,

Alistair

Reply all
Reply to author
Forward
0 new messages