I have a span in my HTML as follows, which I am assigning the text from code behind:
<span id="NewL1" visible="false"
runat="server"><span runat="server" id="NewL"></span></span>
The text would be something like : "you have 3 notifications."
I want to change the numeric value in jQuery. I have tried this but nothing happens:
var notification = $("#NewL");
var numb = notification.text().match(/\d/g);
var finalTotalCount = parseInt(numb) - 1;
notification.text(notification.text().replace(numb, finalTotalCount ));
What I am doing wrong?