packaging the js functions similar to the css ones and giving examples.
adjusting code examples to match the js examples. Changing language to be consistent with "add to page head"
fixing typo