Change the code this way and try again
var notification = $("#NewL"); var numb = notification.text().match(/\d/g)[0]; var finalTotalCount = parseInt(numb) - 1; notification.text(notification.text().replace(numb, finalTotalCount ));
Also in your code:
<span id="NewL1" visible="false" runat="server"> <span runat="server" id="NewL"></span> </span>
You have a span inside a hidden span (visible = "false"). Therefore, we will not be able to see any changes. You can simply put your code like this and try again:
<span runat="server" id="NewL"></span>
palas source share