View Full Version : Custom Select Box? (JS)
lorren.biffin
January 20th, 2008, 04:08 AM
Does anybody have a quick tutorial on creating a custom styled select box with JS/CSS?
(...or if you have a script you already use that makes it easy and isn't too heavy I'd appreciate a link)
Thanks! :)
evildrummer
January 20th, 2008, 08:16 AM
Would you want it to be an actual checkbox element styled or a really custom div type thing which acts as a checkbox?
lorren.biffin
January 20th, 2008, 08:43 AM
Well, to be clear I mean a select box, as in:
<select name="selectname">
<option value="1">One</option>
</select>
As far as I've heard, the only way to do this is to use JS and the DOM to replace the element with another, more flexible element (such as a div) and style/code it to act like it. Problem is, I've not done it myself before, so I'm looking for a good and simple tutorial (or pre-made script) that'll get me through it.
evildrummer
January 21st, 2008, 05:30 AM
EDIT:// I wrote out code to make custom checkbox, I'll change it tonight.
simplistik
January 21st, 2008, 09:22 AM
http://www.badboy.ro/articles/2007-01-30/niceforms/
lorren.biffin
January 21st, 2008, 02:23 PM
I was going to use niceforms...My only problem with niceforms is that it modifies all other form elements as well. Really, all I want to touch is the select boxes.
Thanks for the link though. If I can't find anything else I may end up just cutting the niceforms code down to only the necessary for select boxes.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.