hi,

i will select some elements based on a custom attribute

i have :

<select id="website_id" multiple size="7">
<option account_id="1" value="344">Website</option>
<option account_id="5" value="555">Website 2</option>
<option account_id="11" value="23">Website 3</option>
<option account_id="1" value="34">Website 4</option>
</select>

i want to select and remove all the options that are not selected and
theyre account_id is not 1

i tried
$("#website_id
option:not(:selected):not(['account_id='1'])").remove();
$("#website_id option:not(:selected)['account_id!='1']").remove();

var notSel = $("#website_id option:not(:selected)");
notSel.find("account_id!='1'").remove();

does anyone have any ideas what else i can try?

thanks

Reply via email to