Meshko
Meshko

Reputation: 33

get current cursor type in html(if the cursor is not set via css before, its default[auto]!)

Is this even possible to get cursor type without predefined cursor style, just the default, the one that the web is rendered with?

Upvotes: 2

Views: 1236

Answers (2)

user2718671
user2718671

Reputation: 2976

To get the css cursor property you can use:

var css_property = $('#selector').css('cursor');

To set a css cursor property you can use:

$('#selector').css({"cursor": "pointer"});

You'll need to use a jQuery library.

Upvotes: 4

Nick
Nick

Reputation: 4092

The default cursor that a page is rendered with is "", which is typically an arrow.

Upvotes: 0

Related Questions