Adding Javascript to Drupal Pages

I recently needed a simple OnClick() Javascript function to toggle a < DIV /> area on a Drupal page. Here are the screenshots of the toggled area both closed and open.

So, why you’re here. How to add Javascript to Drupal pages. The first thing to do is grab the Code per Node Drupal Module to add Javascript and CSS to your content types.  Here’s an image of the Javascript Code Per Node form on the page’s Content Type settings and the simple Toggle() script shown above.