Hi Frank,
Let me know how it goes with your testing.
In the meantime, I converted the script to a plugin, so after you
include it, you can just do this:
$('table').simpletip('a'); This will display a tooltip for every link
within the table element, using event delegation.
It also has some options, so you could do something like this:
$('table').simpletip('a.tooltip', {opacity: 0.6, contentAttrs:
['title', 'href']});
This will display a tooltip for every link with class="tooltip" within
a table and set the opacity to 60% and show the link's title and href
in the tooltip.
Here is a demo:
http://plugins.learningjquery.com/simpletip/demo/
And here is the plugin code:
http://plugins.learningjquery.com/simpletip/simpletip.js
Glad you like the website!
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Dec 6, 2008, at 3:31 PM, Frank wrote:
Hm, how very odd indeed. There must something else on my page
conflicting with it then. I'll strip it to the barebones and work my
way back up. Thanks for all the help so far!
May I also say that your website (learningjquery.com) has been an
invaluable font of knowledge for jQuery, as well as both of your
books.
Frank.
On Dec 5, 8:08 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
Ok, I dropped your table into my page, and it seems to work fine.
http://test.learningjquery.com/very-simple-tooltip.html
--Karl
____________
Karl Swedbergwww.englishrules.comwww.learningjquery.com
On Dec 5, 2008, at 11:45 AM, Frank wrote:
Also, I just realised that putting "title"s on TDs is a silly idea,
and completely invalid. But I tried it with a direct copy of your
script after putting actual links in, but still only get empty
tooltips. Here is an example row:
<tr class='adminRow3'>
<td colspan='3'><a href='#' title="Full Title Here"
class='tooltip'><b>Abridged Title</b></a></td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td align='center' style='background-color: #c00'>-</td>
<td rowspan='2' align='center' style='padding: 1px; background-
color:
#921ba9'>Y</td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center' style='padding: 1px'></td>
<td rowspan='2' align='center'>2</td>
<td rowspan='2' style='font-size: 8px'>06:01, 05:55</td>
<td align='center'>Y</td>
<td rowspan='2' align='center' style='background-color: #c00'>-</td>
<td rowspan='2'><a href='' title="Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Integer purus. Duis posuere diam quis
ante. Aliquam erat volutpat. Suspendisse rutrum imperdiet ipsum."
class='tooltip'>Lorem ipsum dolor sit...</a></td>
<td rowspan='2'></td>
</tr>
On Dec 5, 4:29 pm, Frank <[EMAIL PROTECTED]> wrote:
Simply exchanging "A" for "TD" in your script didn't work (that
would
have been too easy :), it only pops up empty tooltips. I'll
continue
to play with it.