aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Enable Disable Hyperlinks using jQuery or Disable Particular Div of Hyperlinks in jQuery

Jul 21, 2013

Here I will explain how to disable hyperlinks using jQuery or Enable / disable hyperlinks using jQuery.


Disable hyperlinks in div

To disable particular link or particular div block of hyperlinks we need to write the code like as shown below

$('#lnkhome').click(function(e) {
// Disable Particular div block hyperlinks
$('#linksdiv a').click(function(e) {
If you want to see it in complete example check below code

<html xmlns="">
<title>Disable Hyperlinks using jQuery</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
// Disable Particular Hyperlink
$('#lnkhome').click(function(e) {
// Disable Particular div block hyperlinks
$('#linksdiv a').click(function(e) {
<b>Disable Particular Link</b><br />
<a href='' id="lnkhome">Google</a><br />
<b>Disable Particular DIV Block Links</b><br />
<div id="linksdiv">
<a href='' id="lnkfacebook">facebook</a>
<a href='' id="lnkgmail">gmail</a>
<a href='' id="lnkaspdotnet">Aspdotnet-Suresh</a>
<a href='' id="lnkyahoo">yahoo</a>
Live Demo

For live demo click on below links and see whether those links redirect to another page or not

Disable Particular Link

Disable Particular DIV Block Links

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Unknown said...


Anonymous said...

please some one expalin function(e) what e contains i am new to jquery

Anonymous said...

but with new tab.., open de url

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.