2

I've created a .png file I'd like to use as a custom cursor on a specific element with class "next".

I'm using this code to no avail. Anything I'm missing?

$('.next').hover
(
    function(e) 
    {
    //$(this).css('cursor','all-scroll'); //WORKS!
    $(this).css('cursor','url(img/right-pointer.png)');
    });
3
  • is the file location right? Is it possible you need /img/right-pointer.png? Commented Jul 5, 2011 at 18:00
  • plugins.jquery.com/project/customcursor Commented Jul 5, 2011 at 18:03
  • Dave, that was it. Once I hardcode the URL it works. Commented Jul 5, 2011 at 18:08

1 Answer 1

6

Why don't you use the following CSS:

.next:hover { cursor:url(img/right-pointer.png); }

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.