Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to disable div and anchor tag in CHROME

functionality of anchor tag is not working in chrome but it is getting displayed as enable...i want to show them in disable mode

below are not working

JavaScript
 $('a[id*="alinkAdd"]').attr("disabled", "disabled");

and

$("#hidediv").css('disabled', 'disabled');
Posted
Updated 12-Jun-13 22:21pm
v2

Apply this CSS to div
XML
$('#divID').addClass('disabledAnchor');

IN css file
<pre lang="css">.disabledAnchor a{
       pointer-events: none !important;
       cursor: default;
       color:white;
}</pre>
 
Share this answer
 
1)Just give id and ,
Set runat="server" to div or anchor tag

like that.

<div id="myDiv" runat="server">

2) Now set this code wherever you want to disable div or anchor tag at Code Behind.

myDiv.Enable=false;

ot

myDiv.visible=false;
 
Share this answer
 
v2

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