Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have an anchor element placed on my HTML page, which is under some conditional statement:

@if(someCondition)
{
HTML
<span class="iop-plan"><a id="IOP-InPlan" class="inactiveLink" >IOP - In Plan</a></span>


}


CSS:
a.inactiveLink {
pointer-events: none;
cursor: default;
color: #333333;
}



My aim is to make the anchor link disabled/non-clickable if the condition satisfies. Therefore I have placed the pointer-events: none in CSS. However, it doesn't seem to work with Internet Explorer. It is working with all the other browsers (Chrome, Mozilla).

Kindly help.

What I have tried:

After reading on internet, I tried things like putting the anchor element inside SVG tag, as people have suggested that IE does identify pointer-events: none with SVG. However, it didnt work.
Posted
Updated 24-Jan-20 8:07am
v2

The pointer-events CSS property not supported in IE before version 11...
 
Share this answer
 
Comments
NJ44 17-May-16 5:53am    
Yes I figured out that. Then what is the other approach through which we can make the anchor link disabled/non-clickable?
NJ44 17-May-16 7:30am    
I am using IE version 11 here.
Instead of doing it using css , try to set attr/prop using jquery
If you are using jQuery < 1.6, do this:

$('#deleteclientajaxformlink').attr("disabled", 'disabled');
If you are using jQuery 1.6+:

$('#deleteclientajaxformlink').prop("disabled", true);
 
Share this answer
 
I was facing exactly same problem. By adding css property 'display: block' to class, it worked on IE 11. I'm just using that now along with 'pointer-events: none'.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900