Automatically show qTip (jQuery plugin) tooltip after page load
Asked Answered
Y

1

9

Has anyone ever used qTip to create a tooltip that responds to a click on an element, but also is set to popup after the page loads? I tried playing around with setTimeout, but I can't seem to get it to load automatically.

Thanks!

Yttria answered 20/2, 2011 at 23:44 Comment(0)
B
19

You can define qtip to display in any event you like, simply by configuring it to not display in an event, but at your whim. For instance:

$(document).ready(function(){
    $('div.some-element').qtip({
        content: 'This is the tooltip',
        show: {
            when: false, // Don't specify a show event
            ready: true // Show the tooltip when ready
        },
        hide: false // Don't specify a hide event
    })
});
Bossy answered 20/2, 2011 at 23:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.