Replacing certain text in an element?
I'm trying to simply replace a certain string from the contents of an element, I tried this:
<div id="errorCont">Microsoft and Apple</div>
- var ErrorContText=$("#errorCont").html();
- ErrorContText=ErrorContText.replace("Apple","No one");
- $("#errorCont").html(ErrorContText);
So the div SHOULD now say "Microsoft and No one", but it's not working :(