Passing PHP Variables to Javascript in WordPress

Sometimes you need data available to your scripts on the front end that you can normally only get from the server side of WordPress. Fortunately WordPress provides a relatively simple way to do this.

Read More

Modernizr Fallback to jQuery UI for Native Datepickers

Date Inputs

Native HTML 5 datepickers are great, they offer a simple to use interface (that works particularly well on mobile) plus they’re dead simple, just stick a [type=date] attribute on a <input> element and away you go. However, not all browsers support this so and will simply fall back to [type=text] so a fallback is required for unsupported browsers

Read More

Using jQuery to Show/Hide Element Based on Dropdown Selection

Just a quick code snippet to show how to show/hide html elements based on the active option in a select dropdown.

Read More