ashu
ashu

Reputation: 1359

Set SVG as mouse pointer image

I am having a svg image .I neet to set that svg image as mouse pointer using javascript.

I can able to set the image as mouse pointer using following code:

  $("div").mouseover(function(){
            $(this).attr("style","cursor: url(red_bucket.png), pointer;");
        });

Is there any possiblities to set the svg as mouse pointer...?

Upvotes: 0

Views: 1180

Answers (1)

Art
Art

Reputation: 592

This should work

    $("div").mouseover(function(){
        $(this).attr("style","cursor: url('red_bucket.svg'), pointer;");
    });

Upvotes: 2

Related Questions