EPA uses jQuery as its main JS library. This library "sits" on top of JS and makes common tasks easier. When you write in JQuery, you're still writing JS, but what used to be 50 lines may now be one or two.
We are providing a standard suite of JS files for everyone at the Agency to use. Linking to the EPA master JS files will improve our site performance, as users will cache a copy of the JS files. We're also providing a set of jQuery plugins, along with the styles required by those plugins.
Please note, all JS, in content managed by the Drupal WebCMS, will be output at the bottom of the HTML, just before the closing
</body> tag. Placing scripts here speeds up epa.gov for our readers.
For more complicated JS needs, like calculators and widgets, Drupal WebCMS will allow web area webmasters to include JS as needed.
- You cannot use JS to create or modify styles for your content
- Functions first check to see if an object is available. If not, then fail silently
- For example, if form entries must be validated before they go into a database, carry out that function on the server
- If you offer advanced functionality and your pages cannot work the same way without JS, then, at a minimum, provide
- a phone number or email address to get help
- All Drupal WebCMS content will link to the master jQuery file.
- If you want to add additional plugin functionality, you must request that those plugins be uploaded to the master repository.
About this Standard
Effective date: 09/28/2005
Date approved: 09/12/2012
Web Council review by: 09/02/2014 (or earlier if deemed necessary by the Web Council)