0

This is my JS code:

    <script type="text/javascript">
       function leftCur(elem) {
          elem.style.cursor = 'url("izgled/slike/right.png"), auto';
       };
    </script>

And this is part of my HTML code:

<div class="mainleft" onmouseover="leftCur(this)">

When I hover with mouse over a div, mouse pointer changes picture, it works in Chrome and FF but it doesn't in IE.

THx.

zonelsk
  • 235
  • 1
  • 5
  • 14
  • Your code doesn't make a lot of sense. First, you posted "rightCur" but the event handler calls "leftCur". The handler assigns the return value of the function to the "value" property of the element, but `
    ` elements don't have a "value", and if "leftCur" is anything like "rightCur" it doesn't return anything anyway.
    – Pointy Apr 25 '13 at 14:31
  • 2
    Why are you not doing this in pure CSS? `div.mainleft:hover { cursor : move; }` – epascarello Apr 25 '13 at 14:31
  • possible duplicate of [Cursor image not working in IE](http://stackoverflow.com/questions/10222328/cursor-image-not-working-in-ie) – Pointy Apr 25 '13 at 14:32
  • Sorry i corrected the code. I tried also with .gif image but it doesnt work – zonelsk Apr 25 '13 at 14:37
  • I tried with css, it doesn't work. – zonelsk Apr 25 '13 at 14:55

1 Answers1

0

At least some versions of Internet Explorer do not support .png or .gif cursors.

MDN has a great reference here

Try using a .cur cursor instead.

Jason Nichols
  • 3,739
  • 3
  • 29
  • 49