Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery simplemodal causing hover() to trigger multiple times?
    primarykey
    data
    text
    <p>I've got a simple hover() event that works great here: <a href="http://waterworks.reuniondesign.com/rates" rel="nofollow">http://waterworks.reuniondesign.com/rates</a> (hover over one of the slip numbers)</p> <p>And it works great on the homepage here, where I've unhidden it: <a href="http://waterworks.reuniondesign.com/" rel="nofollow">http://waterworks.reuniondesign.com/</a> (scroll down)</p> <p>But when one clicks on "Click here for marina layout" on the homepage, and the div is made into a simplemodal box, the hover() event is triggered twice when one mouseovers a slip number. Why is that? I tried making a thing that sets a variable to see if it's already been launched, but it didn't work. Any ideas?</p> <p>Here's the code to do the hover event. jLoader is an ajax function:</p> <pre><code> $(document).ready(function(){ var live = false; $('.slip').hover(function(){ console.log('opening ' + live); if (live != true) { live = true; console.log('still opening ' + live); $(this).css('z-index','999'); $(this).delay(500).append("&lt;div id='slip_popup'&gt;&lt;div id='slip_details'&gt;loading slip details...&lt;/div&gt;&lt;/div&gt;"); jLoader('/blocks/slip_detail.php?slip_number=' + $(this).attr('id').replace('slip_',''),'replace','slip_details'); } },function(){ $(this).css('z-index','1'); $('#slip_popup').remove(); live = false console.log('closing ' + live); }); }); </code></pre> <p>Finally, if anybody knows why the delay function isn't working before the append() function I'd love to know!</p>
    singulars
    1. This table or related slice is empty.
    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