Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML5 image rotate with imagemap doesn't work in IE 8. Why?
    primarykey
    data
    text
    <p>I have an image with an imagemap. The imagemap split the image in 4 sectors (top, right, bottom, left). Everytime u click a sector (imagemap area) the image rotate until this sector is on top. I created a small example to show how I did it: <a href="http://jsfiddle.net/44YhF/" rel="nofollow">http://jsfiddle.net/44YhF/</a></p> <p>Or as full HTML-Document:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="js/jquery-1.9.1.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/jQueryRotate.js" type="text/javascript"&gt;&lt;/script&gt; &lt;!-- QueryRotate is from: https://jqueryrotate.googlecode.com/files/jQueryRotate.js --&gt; &lt;script type="text/javascript"&gt; rotated=0; aktuell=0; isRotating=false; jQuery(document).ready(function() { $("#map area").click(function(event) { console.log("click"); event.preventDefault(); //bringt auch nichts if(!isRotating||true) { //true hier raus nehmen damit die einzelnen Abschnitte nur klickbar sind wenn gerade keine Rotation läuft isRotating=true; pos=0; if(aktuell&lt;$(this).attr("pos")) { pos=$(this).attr("pos"); } else { pos=parseInt($(this).attr("pos"))+4; } rotatedif=360-(Math.abs(aktuell-pos)*90); rotate=rotated+rotatedif; aktuell=$(this).attr("pos"); $("#cycle").rotate({animateTo:rotate, duration:(10-(Math.abs(aktuell-pos)))*300, callback: setRotatingOff}); rotated=rotate; } }); function setRotatingOff() { isRotating=false; } }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img src="http://uploads6.wikipaintings.org/images/m-c-escher/circle-limit-iii.jpg!Blog.jpg" id="cycle" border="0" usemap="#map"&gt; &lt;map id="map" name="map"&gt; &lt;area shape="poly" coords="82,73,250,248,429,91," href="#" alt="" title="" pos="0"/&gt; &lt;area shape="poly" coords="421,85,250,246,417,419," href="#" alt="" title="" pos="1"/&gt; &lt;area shape="poly" coords="249,247,412,418,75,414," href="#" alt="" title="" pos="2"/&gt; &lt;area shape="poly" coords="248,247,74,411,82,76," href="#" alt="" title="" pos="3"/&gt; &lt;/map&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This works in Chrome, Firefox, IE9/10. But in IE8, the Image rotate only the first time you click an area. After the first click, no more clickevents are fired when u click an area.</p> <p>What can I do to get this working in IE8?</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.
 

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