Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery and sIFR. On hover - delay and show
    primarykey
    data
    text
    <p>I'm trying to make a sIFR text appears when hovering on a div, with some delay.</p> <p>The markup is like this, several times :</p> <pre><code>&lt;div class="box"&gt; &lt;div class="text"&gt; &lt;h6&gt;sIFR Text&lt;/h6&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>This code is doing the trick (from hide to sIFR on hover), but without delay :</p> <pre><code>$(document).ready(function() { $('.text').hide(); $('.box').mouseover( function() { $(this).children('.text').show(); //sIFR code : sIFR.replace(rockwell, { selector: 'h6', css: [ '.sIFR-root { color:#FFFFFF; font-size: 1.2em; text-transform: uppercase }', 'a {color: #333333; text-decoration: none;}', 'a:hover {color: #333333;text-decoration:underline;}' ], wmode: "transparent" } ); //sIFR ends }); $('.box').mouseout( function() { $(this).children('.text').hide(); } ); }); </code></pre> <p>I tried to use the hoverIntent plugin, loading it, and using it like this, but it doesn't seems to work :</p> <pre><code>$(document).ready(function() { $('.text').hide(); $('.box').hoverIntent( function() { $(this).children('.text').show(); //sIFR code should go here sIFR.replace(rockwell, { selector: 'h6', css: [ '.sIFR-root { color:#FFFFFF; font-size: 1.2em; text-transform: uppercase }', 'a {color: #333333; text-decoration: none;}', 'a:hover {color: #333333;text-decoration:underline;}' ], wmode: "transparent" } ); //sIFR ends }, function(){ $(this).children('.text').hide(); } ); }); </code></pre> <p>Can you point out any alternative ? Maybe setTimeout is a good alternative, but I neve used it before, and I'm not really sure where should I put it.</p> <p>Thanks for any tip.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload