Retreive $_GET variables in JavaScript from a URL string

In the case I had found working on a WordPress plugin yesterday, I needed to manipulate and read a URL that was given as a string by a user.

For example, https://www.google.ca/?output=search&q=cats was given and I would want to be able to retrieve what q‘s value was, or if it even existed.

Thanks to Adam Zwakenberg (@AdamZwakk) for showing me this cleaner version.
Continue reading Retreive $_GET variables in JavaScript from a URL string

Finding the full height of a partially-hidden element

Recently I created a widget that contained a potential LARGE amount of content within it, but wanted to create a solution to have all that data accessible without being unreasonably long. My solution was to create a widget that had up/down controls, and scrolled the content inside of the widget.

The issue I ran into along the way was for a way to find the height of the entire content, not just the visible content. I ended up finding the answer after many many pages of search results:
Continue reading Finding the full height of a partially-hidden element