A technique you can use to get all query string parameters and push them into an object of key/value pairs.
Page Details
Get Width and Height of an Element
To get the width and height of an element, you use the offsetWidth and offsetHeight properties of the element.
Get the Width and Height of the Window
How to get the width and height of the window in px.
Get and Set Scroll Position of an Element
To set or get the scroll position of an element, you use the properties scrollTop and scrollLeft of the element.
Check if the browser tab of the page is focused
Use the Document.hidden property, introduced by the Page Visibility API to check if the browser tab of the page is visible or hidden.
Get the size of an image
These snippets will get the height and width of an image, one when it is loaded and another when the image is not loaded yet.
Delayed Image Loader
Use this script to delay the loading of a particular image. It can be used to delay the loading of large images or banner advertisements. A smaller image is loaded first, which can be transparent or blank. After a designated amount of time the larger image will load in place of the smaller one.
Copyright Notice
This unobtrusive script will update the current year for the copyright notice on a page. No need to worry about changing it from year to year. Very easy to implement.
Hexadecimal Color Wheel
A dynamic color wheel displaying 4096 colors in a chromatic scale utilizing cross browser mouse event capture from a layer to display the hexadecimal codes of each color. Easily find that elusive color code you were looking for and learn how to manage layers and mouse events.
Top Window
Use this JavaScript to keep a window ‘on top’ of the rest of your other windows. Not sure what I mean? Try it out and see!