I have three linkbuttons when the user selects the current link it should be red.but at present it even makes the visited link also red which should not be the case.can any one help regarding this?
<li>
<asp:LinkButton ID="lnkCat1" runat="server"
OnClick="lnkCat1_Click" CssClass="mylink"
OnClientClick="return changeColor();"></asp:LinkButton></li>
<script type="text/javascript">
function changeColor(e) {
e.style.color = "red";
}
}
</script>
try this code:
Please include jquery first
css
javascript: