Sometimes it is confusing that the description of the activity is under the title/link on the course main page, and the same text is also visible when you open the activity.
On the course view and on the activity view page you might need a little bit different content. Or you would like to mimic the fancy Show more... or Read more... buttons on modern web pages.
The following solution will show the button on the course view page but not on the activity page, even if the description is visible on both views.
First, we have to add the JQuery code to the usual place:
Dashboard > Site administration > Appearance > Additional HTML