How make activate cluetip on event ready or onload?
The clueTip plugin allows you to easily show a fancy tooltip when the user's mouse hovers over (or, optionally, clicks on) any element you designate in your script. If the element includes a title attribute, its text becomes the heading of the clueTip.
By default the tooltip is shown while hovering the element you applied it on (see the default options)
This can be changed to the click
event, I'll demonstrate both.
The idea is to programmatically trigger the event mouseenter
(there no real hover event but a combination of mouseenter and mouseleave).
You can do this by using .trigger('mouseenter')
or .mouseenter()
Let's say you want to open the tooltip on a link:
<a href="#" id="mylink" title="This is the title|The first the content.|In this case, the delimiter is a pipe">My link</a>
You'll have the following javascript:
$(document).ready(function() {
var $link = $('#mylink');
// first initialize the plugin
$link.cluetip({
splitTitle: '|'
});
// trigger the event
$link.mouseenter(); // or $link.click();
});
Here is a jsfiddle for you to play with.
Documentation of hover, .mouseenter(), .click() and .trigger()