I want to replace the text( "My Text" ) that is inside of a tag <a>
this is my code:
<a id="myID" href="#">
My Text
<img src="/layout/images/blank.gif">
</a>
I tried:
$( "#myID" ).text( "New Text" );
But I returns this error:
TypeError: string is not a function
message: "string is not a function"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
proto: Error
and:
$( "#myID" ).html( "New Text" );
TypeError: undefined is not a function
message: "undefined is not a function"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
proto: Error