Chorn Sokun's Weblog

Conquer inner fear, push it to the limit!

jQuery.selectboxes removeOption()

leave a comment »

Base on the doc page located here if I wanted to remove (clear) items from a select box all I need to do is call:


But in my case I had a select box like this:

<select name="select_box" id="select_box">
    <option value="">N/A</option>
    <option value="1">Low</option>
    <option value="2">Meduim</option>
    <option value="3">High</option>

and of cause the syntax specified above doesn’t do the trick; this is how I fix it:


Was that how it should be done? oh ! by the way the shorter way


Written by Chorn Sokun

July 28, 2009 at 3:58 pm

Posted in Tips & Tricks

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: