Search code examples
jqueryhtmlqtipqtip2

Hide div when using qtip


Maybe this is a dummy question, but... what's the way to hide a div when the html loads and then show it via qTip? I tried to hide it with $(div).hide and <div style="display: none;">, but the qtip doesn't work.

UPDATE

Code in the .js

$('#usuario').qtip({
    content: $(this).next(),
    show: 'click',
    hide: 'unfocus'
});

Code in the html

<span id='usuario_menu'>
            <a id="usuario" ><?php echo $_SESSION['correo']; ?></a>
            <div class="hidden">
                <a href="php/login_out.php">Cerrar sesión</a><br/>
                <a href="">Otra cosa</a>
            </div>
            <img src='' alt="Tareas pendientes">
        </span>

Solution

  • SOLVED The answer is among the comments on this:
    jQuery qTip: How to attach a single tooltip div to multiple target divs?

    However, if there anothers answers, they are welcome :)