I am getting a problem in my application, where i want to disable html
anchor with css
, I have seen a solution in Disable link using css, which is working fine in Chrome
and Firefox
, but when i am opening my page to Internet Explorer
, It could not be disabling, I have gone through many links but i didn't get any solution for internet explorer, Please help me if you have any helpful link or answer. Thanks in advance
http://jsfiddle.net/7EQJp/
<a href="link.html" class="active">Link</a>
.active {
pointer-events: none;
cursor: default;
}
You can use pointer-events css property to disable the links but they have known issues with ie. Starting from ie 11 this property is supported. There is a little hack. You should add disabled class to links and add disabled attribute to the link then add css that is given below. Also you need to provide pointer-events none for disabled anchor attribute. After these two this should work in most browsers.
a.disabled {
pointer-events: none;
}
a[disabled] {
pointer-events: none;
}
See this fiddle.
CSS way to disable links:
a[disabled]{
pointer-events: none;}
else you can use javascript to disable links:
$("td > a").attr("disabled", "disabled");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With