Hi
I know there are many custom tooltips out there, but I wanted to do a
different approach!
Here is what I want to do!

When a map is rendered , with say one marker, the html is:
<div .......>
    <img ......... />
    <map .......>
         <area  ......  title="title supplied when creating marker" />
     </map>
</div>

I have a jQuery library which looks for the title attribute and then
does some funky stuff to render a nice looking tooltip as opposed to
the one which browser's give normally!

Now I want to know how is it possible to add:
class="tooltip" and title="some title entered when creating marker"
to the <div> as shown in the codeabove.

Currently i have a hack which does it for me
                   $("area").each(function(i, mappedIcon) {
                                        var title = 
mappedIcon.getAttribute("title");

                            if(title != "")
                            {
                                mappedIcon.setAttribute("title", "");
        
mappedIcon.parentNode.setAttribute("class","tooltip");
        
mappedIcon.parentNode.setAttribute("title", title);
                            }
                         });


BUT SURELY there is a more elegant way of doing this!

Open for suggestions!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to