Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Fixed!</p> <p>It turned out IE was triggering the hover event every time the mouse moved over the injected child elements, while other browsers were only triggering while hovering over the element that had the bind, as you'd expect.</p> <p>event.stopPropagation wasn't working for me, so I faked it with the help of .data(). Here's the end result:</p> <pre><code>jQuery('.current img').hover(function() { jQuery(this).parent().addClass('hover'); jQuery(this).parent().parent().find('.hotspot:not(.hover) span:not(.select-image)').remove(); jQuery(this).parent().parent().find('.hotspot:not(.hover) img').data('hovered', 'false'); jQuery(this).parent().removeClass('hover'); if(jQuery(this).data('hovered') != 'true') { jQuery(this).data('hovered', 'true'); jQuery(this).parent().parent().find('.hotspot span:not(.select-image)').remove(); jQuery(this).parent().find('span.select-image').remove(); jQuery(this).parent().prepend('&lt;span class="zoom-in"&gt;&lt;/span&gt;&lt;span class="select-image"&gt;&lt;/span&gt;&lt;span class="zoom-out"&gt;&lt;/span&gt;'); jQuery(this).parent().find('.zoom-in').click(function() { z += .1; z = Math.min(z, 5); jQuery(this).parent().find('img').attr('src', '&lt;?php echo $urlPrefix; ?&gt;/zcard-thumbnail-image/photos/&lt;?php echo $modelId; ?&gt;/low/' + i + '/' + (w * z) + '/' + (h * z) + '/file'); }); jQuery(this).parent().find('.zoom-out').click(function() { z -= .1; z = Math.max(z, 1); jQuery(this).parent().find('img').attr('src', '&lt;?php echo $urlPrefix; ?&gt;/zcard-thumbnail-image/photos/&lt;?php echo $modelId; ?&gt;/low/' + i + '/' + (w * z) + '/' + (h * z) + '/file'); }); } }); </code></pre> <p>Massive thanks to everybody for helping with this one and I hope the above is useful to somebody experiencing similar issues.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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