Based on some conditions we enable/disble above settings icon and dynamically change the href value.
Below code snippet for html code:
<a id="TargetUrl" href="#" target="_blank">
<span id="Settings" class="glyphicon glyphicon-cog"
style="color:#008998 !important;font-size: 24px !important;z-index: 9999 !important;" title=" Settings" ></span>
</a>
if ('@Session["Access"].ToString()' == 'Yes') {
var newurl = 'http://Server01:8076/';
$("#TargetUrl").attr("href", newurl );
$('#Settings').show();
} else {
$('#Settings').hide();
}
We could able to enable disble span tag but href URL value is not changed dynamically.
Could you please help us to fix.
Thanks in advance.