With jQuery, I'm trying to replace the text, including the span, inside these links on hover. Then when the user hover's off, the original text is displayed again.
<a class="btn" href="#">
<img src="#" alt=""/>
<span>Replace me</span> please
</a>
<a class="btn" href="#">
<img src="#" alt=""/>
<span>Replace me</span> please
</a>
The final output should be
<a class="btn" href="#">
<img src="#" alt=""/>
I'm replaced!
</a>
I'm toying around with but not sure how to replace it back. Any ideas?
$('.btn').hover(function(){
$(this).text("I'm replaced!");
});