Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery hover popup a div
    text
    copied!<p>Im using this Jquery to popup a div </p> <pre><code> &lt;script type="text/javascript"&gt; $(function () { $('.bubbleInfo2').each(function () { var distance = 10; var time = 250; var hideDelay = 500; var hideDelayTimer = null; var beingShown = false; var shown = false; var trigger = $('.trigger2', this); var info = $('.popup2', this).css('opacity', 0); $([trigger.get(0), info.get(0)]).mouseover(function () { if (hideDelayTimer) clearTimeout(hideDelayTimer); if (beingShown || shown) { // don't trigger the animation again return; } else { // reset position of info box beingShown = true; info.css({ top: 40, left: -160, display: 'block' }).animate({ top: '-=' + distance + 'px', opacity: 1 }, time, 'swing', function () { beingShown = false; shown = true; }); } return false; }).mouseout(function () { if (hideDelayTimer) clearTimeout(hideDelayTimer); hideDelayTimer = setTimeout(function () { hideDelayTimer = null; info.animate({ top: '-=' + distance + 'px', opacity: 0 }, time, 'swing', function () { shown = false; info.css('display', 'none'); }); }, hideDelay); return false; }); }); }); //--&gt; &lt;/script&gt; </code></pre> <p>it's working well but i need to change in a way to be able to call it in a function and to pass the parameters because im using it several time on the page.In way to don;t have it many times on the page</p> <p>that i would call it in something similar to this :</p> <pre><code> &lt;script type="text/javascript"&gt; jQuery(function ($) { $(".bubbleInfo2").BubleFunction(....parameters to be passed }); &lt;/script&gt; </code></pre>
 

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