A modern browser is required for security, reliability, and performance. Contact us.

Jun 29 2012

Custom Selects without JS

So for a project I was working on I needed to implement a custom button to trigger a select list.

Instead of using a JS plugin I decided to roll a very simple solution that yielded a highly useful bit of code.

The idea behind it is that we hide the select tag by setting the opacity to 0. Due to the way select options are rendered they still show when their parent select has been tripped.

Here is the gist

—Sam Saccone