This project is archived and is in readonly mode.

#118 ✓resolved
David Walsh

Tooltips & Element Title Attribute

Reported by David Walsh | June 12th, 2008 @ 03:46 AM

I'm hoping this isn't a duplicate of Ticket #30.

I'm trying to create ToolTips that use the old method of content/text building, like "Title::Text". To accomplish this, I code:

$$('a.tipz').each(function(element,index) {
	var content = element.get('title').split('::');'tip:title', content[0]);'tip:text', content[1]);

Unfortunately, when I mouseover the link to view my tooltip, Firebug tells me that "element.get('title') is null".

Looking at the Moo core ToolTip code, I see:


If I comment out this code, the tooltip content builds and displays as it should.

My guess is that element.erase('title') is meant to prevent the default yellow inherent tooltip created by the browser, but this cause a problem when trying to customize the tooltip.


Comments and changes to this ticket

  • David Walsh

    David Walsh June 12th, 2008 @ 09:37 PM

    Ooops. Looking at my ticket, the "" stuff isn't necessary.

    That said, the core issue still remains that the title is removed and I can't use get('title') to set the content.

  • David Walsh

    David Walsh June 22nd, 2008 @ 11:08 PM

    In looking at this issue more, it looks as though may not be a defect but simply a lack of documentation. I see now the Tips code is looking for the tip "text" in the element's "rel" attribute. Updating the documentation may help curb some confusion.

  • eldor

    eldor September 3rd, 2008 @ 09:05 AM

    • Tag set to minor, tips

    Just wondering... Are there any reason for not using the old version/method where you seperate title and text in the title tag with :: (Title::text)?

  • Aaron Newton

    Aaron Newton February 19th, 2009 @ 12:22 AM

    • Tag changed from minor, tips to tips
    • Assigned user changed from “Valerio” to “Aaron Newton”
    • Milestone cleared.
  • Christoph Pojer

    Christoph Pojer March 14th, 2009 @ 12:01 AM

    • State changed from “new” to “resolved”

    I think we don't need this one any more

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins