في الواقع لن تحتاج سوى هذا الكود البسيط:

This is my long test  
<span onclick="this.innerHTML = this.getAttribute('showmore');" showmore="and this is the rest of the text">Show More</span>