js

Simple Sticky Element

The user scrolls down the page and once the scrolling reaches the top of an element of my choosing, that element sticks to the top of the window, so it's always visible from that point on...

A Nicer Select Dropdown

Better select boxes are all over the internet, but I actually couldn't find one that I liked, and that worked for what I needed...

Removing the Horizontal Margins on a Google Chart Graph

I seem to be able to successfully modify quite a bit with google charts, but I couldn't find a good way to remove the horizontal padding to the left and right of a google graph. From what I can find, there really isn't a good way to do it...

PHP JSON Returned As Object Instead of Array

I was returning, what I thought was an array from PHP, but it kept returning it as a json object...

A Simple Slideout Menu

I just wanted an easy slideout menu. Click on a link, and the menu slides out from the left side of the screen. Click on the link again, or somewhere else on the page, and the menu slides back in...

Enhancements for jPlayer Implementation

I love the jPlayer for easily being able to add modern mp3 support to web pages.  I wanted a few additional features

Preserving Click Events With jQuery UI

My click events weren't being preserved when using the jquery sortable functionality...

Javascript define a variable if it isn't defined currently

It seems like this comes up quite a bit. This will create a new variable if the variable isn't currently defined...

Debugging Firefox Mobile on Your Computer

I needed to debug a web page that I was working on, which was having some issues on mobile versions of firefox. I just needed to look at the console, but setting this up was a bit complicated, moreso than it should be...

Slide a Div Up From the Bottom of the Page

Getting a div to slide up from the bottom of the page when opening, and slide back down when hiding.

Only Include jQuery if it Hasn't Already Been Included

If jQuery gets included twice, things break...

Accordion Menu

A navigation list. Clicking on a main link opens a sub-level of navigation, while hiding any other sections that are currently open.

A Super Simple jQuery Fading Slideshow

I usually end up doing a search about every month for a nice slideshow script that fades between the various slides...

Add Stroked Point Markers to a Google Line Chart

I was pretty easily able to add point markers to a google line chart, but it took a little more digging to be able to add a line stroke to those points...

Add Point Markers to a Google Chart Line Chart

It's pretty easy to add points or nodes to a google line chart.  The keys are to add the pointSize option to the chart options object...

Loop through all elements of a class

Looping through all elements of a class...

Get the Next Element of a Class with jQuery

I've been looking for a good way of finding the next element with a given class name...

Namespacing in Javascript

So the other night I was working on some fancy script. It didn't work. After a bit of investigation, it turns out that one of the function names was already being used...

Elegantly Run a Function on Window Load or Window Resize

Pretty straightforward, but I wanted to run a function on the window load event, or if the page was resized...

Responsive Tiles

For a couple of projects, I wanted to create tiles that automatically resized themselves based on the screen size...