The demo below shows you how to add a simple JavaScript in a SharePoint site. Welcome to have a look if you know
how to use JavaScript
‒ or will learn it! ‒ and want to know how to add it
to your SharePoint site in the best way.
Peter Kalmstrom, CEO of kalmstrom.com Business
Solutions, shows the following steps:
How to NOT embed a piece of JavaScript
If you just add it to the code of a page it will not stay.
How to add the JavaScript using the the Content Editor web part.
This way it will stay and work.