Scott B
Scott B

Reputation: 40207

Custom cursor graphic via jQuery.css()

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)');
    });

Upvotes: 2

Views: 6217

Answers (1)

Alex
Alex

Reputation: 35407

Why don't you use the following CSS:

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

Upvotes: 6

Related Questions