javascript - Dynamically created mouse cursor? -
i have javascript/jquery project requires dynamically created labels used mouse pointer. there way change mouse cursor use dynamically created images?
var mybase64label = createlabelpngbase64("hello world!", "#ff0000"); $("#pagecontainer").css("cursor","url("+mybase64label+"), auto");
make sure url()
indicates mybase64label
in fact base64-encoded. should url(data:image/png;base64,ivborw0kggoaasuh...)
i'm guessing work:
$("#pagecontainer").css("cursor","url(data:image/png;base64,"+mybase64label+"), auto");
check out example here.
Comments
Post a Comment