Saturday 28 September 2013

How to Disable Anchor tag after clik the link Using JQuery

<html>
<head>
<style>
.myDisableClass {
pointer-events: none;
cursor: default;
text-decoration: none;
}
</style>
<script src="jquery.js"></script>
<script>
$(document).ready(function() {
$("#firstAnchor").click(function(e) {
$(this).addClass("myDisableClass");
});
});
</script>
</head>
<body>
<a id="firstAnchor" href="https://www.google.com" target="#">Click Me</a>
</body>
</html>