JQuery does not depend on function of another control

I have the following code:



It will remove all options except the first. Now I need to remove all parameters except the first, and also not remove the parameter whose value is equal to the label text. How can I tell what is with writing a limited amount of code?


source to share

2 answers

try it

return $(this).val()!=$(this).text();




I would try

    return $(this.labels).text() == this.value;




All Articles