MyBB Community Forums

Full Version: How to design Tooltips in Mybb?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to customize the tooltips display.
When you hover a certain area with "title" tags

Can someone tell me how to do that?

examples: http://www.webdesignbooth.com/15-jquery-...y-tooltip/
Where and what exactly you want to change to those tootips ?
All the tool tips in mybb
Then you've to modify templates (Wherever the title tags are used.)
How to single edit that works universal?
You could do this using jQuery to select all elements with a title attribute. Something like this:

jQuery.noConflict();

jQuery(document).ready(function($) {
    $('[title]').hover(function() {
        //hover over - do something (like show your tooltip)
    }, function() {
        //hover out - do something (like hide the tooltip)
    });
});

That's some basic code to help Smile



Edit:

Here's a basic example that shows a simple tooltip type of thing: http://jsfiddle.net/euantor/tpyVa/
Thanks, i will try it tomorrow Big Grin
No problem. I'm actually having a go at doing what you want on jsFiddle now, so I might have it sorted by the time you get round to doing this Smile
In fact, I've finished Smile It's pretty simple, but you can style the tooltip however you want Wink I hope it's what you're looking for (you could always enhance it with one of the plugins shown in the post you linked to - this is just a simple example of the code in action)

In fact, use this plugin here: http://flowplayer.org/tools/tooltip/index.html

They actually provide a code snippet to do it - just use "$('[title]').tooltip();" instead of all my code - wrap it like so:

jQuery.noConflict();

jQuery(document).ready(function($) {
    $('title]').tooltip();
});

That's much easier ;P