Search code examples
jquerycsshyperlinkhrefinternet-explorer-10

Disable link from being click on Internet explorer 10


Hey guys I am trying to disable a link from being clicked. I tried using a CSS solution:

.link-disabled {
    pointer-events: none;
    cursor: default;
}

It doesn't work in IE10 and below. Is there a CSS or jQuery solution to this?


Solution

  • $('.link-disabled').click(function(){return false;});
    

    Explanation:

    return false; in an event handler prevents the default action and stops the event propagation through the DOM.

    Fiddle

    Let me know if this was useful.