Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS pointer events and cursor style [duplicate]

Tags:

html

ajax

css

I have a problem with combination of pointer-events: none and cursor: wait. I need to disable clicking and show waiting cursor while ajax is in process. There is a mechanism that automatically adds or removes wait class to body tag. Without pointer-events: none, the wait cursor appears, and when there are both cursor: wait and pointer-events: none, the cursor doesn'change but stays a default arrow.

.wait {     cursor:wait;     pointer-events: none; } 

Is there any way to solve this only with css or i must do the trick with a transparent div? Thanks in advance.

like image 946
user2622062 Avatar asked Jul 26 '13 09:07

user2622062


People also ask

How do you combine cursor not allowed and pointer events none?

you can't do this because pointer-events: none; disable all mouse functions, but you can do a trick and wrap your button with a div then use cursor: not-allowed; on this. Work great.

How do I change cursor to pointer in CSS?

You can simply use the CSS cursor property with the value pointer to change the cursor into a hand pointer while hover over any element and not just hyperlink. In the following example when you place the cursor over the list item, it will change into a hand pointer instead of the default text selection cursor.


1 Answers

Unless you have click listeners on the body itself, show about this?

.wait {     cursor:wait; }  .wait > * {     pointer-events:none; } 
like image 137
Prinzhorn Avatar answered Sep 20 '22 10:09

Prinzhorn