You used the wrong
text()
version...
In jQuery methods are behave - mostly - in a unified way... The version with no parameter will return the current value (text() will return the current text value of the selected elements), while the version with parameters will set the new value (text('me') will set value of text to 'me' for selected elements)...
So you have to use the right one, here...
.text() | jQuery API Documentation[
^]