Javascript select parser

March 22, 2012

Mind you this is an early stage prototype which I threw together in about two hours.

I wanted to be able to modify and design a <select> element without breaking it for users without javascript. So what I decided to do was to build a prototype handle which parses all the select dropdowns, hides them and creates new ones which work in the same way but are CSS customizable. But the important thing was that the frontend developers wouldn’t need to be concerned about coding something non-standard, which means they could use <select> the standardized way.

There’s still some quirks needed to be fixed, but all in all it works pretty well.

You won’t be able to use it straight out of the box and there’s no documentation in the code, but there is nothing mind-blowingly hard in the code if you know javascript.

Download: jsselect.v1 (3.04 kB), Try: //benjaminhorn.io/data/jsselector/

Tags