Try removing the colon (:) after the option element, like so: $('option[value*=\'2\']', $('#category_1')).size()
On Oct 8, 12:11 pm, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to get the option with a specific value in it. > > This is the syntax I use and doesn't works: > > alert($('option:[value*=\'2\']', $('#category_1')).size()); > > It alerts 0, if I try without the value I get the correct size of the > options in the select. > > Where's the error? > > Thank you