I'm trying to make this as easy as possible for developers to use, but I have a question about how it's implemented. Currently to use it you place the function call within an 'onmouseover' attribute, like this:
But - this means you need to use both the double and single quote mark, which means if your 'tip' has quotes it can get real messy. I thought of changing it so you just used a class name instead of an 'onmouseover'. Somethng like this:
<a href="#" onmouseover="tooltips('Tools tip message number 1');">
Where I would scan the page for all items with the class "tooltips" and automatically create onmouseover events for them, displaying the text found in the attribute 'tooltipsMsg'.
<a href="#" class="tooltips" tooltipsMsg="Tools tip message number 1">
Is this second approach too obscure? Non-intuitive? I don't want people looking at the code in the page wondering what the heck is going on. I want it to be easy to use even for new and semi skilled developers.
Any thoughts ?