Javascript show more/show less code

Hi, can someone help me with some javascript code. I have some text in a paragraph element, and i want it to show only X number or words when the page loads. When i click show more, the rest of the text is displayed. And clicking show less will show the original number of words.