Automatically show qTip (jQuery plugin) tooltip after page load

蹲街弑〆低调 提交于 2019-12-21 09:17:16

问题


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!


回答1:


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
    })
});


来源:https://stackoverflow.com/questions/5060955/automatically-show-qtip-jquery-plugin-tooltip-after-page-load

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!