Thanks Maurício for your quick response. I have a program to automatically generate jQuery selectors based on some UI element attributes and seems your syntax is not always working. For example,
1) working: $('div:has(input[type=text][readonly=true], img [style="overflow: auto; width: 356px; height: 100px;"]) img') 2) Not working: $('div:has(input[type=text][readonly=true] [style="width: 343px;"], img[style="overflow: auto; width: 356px; height: 100px;"]) img') 3) Not working: $('div:has(input[type=text][readonly=true], img [style="overflow: auto; width: 356px; height: 100px;"]) img [style="overflow: auto; width: 356px; height: 100px;"]') 4) Not working: $('div:has(input[type=text][readonly=true] [style="width: 343px;"], img[style="overflow: auto; width: 356px; height: 100px;"]) img[style="overflow: auto; width: 356px; height: 100px;"]') Here "not working" means it returns empty object where it should return non-empty object. Do you know what is wrong? Thanks again, John On Aug 25, 2:50 pm, "Mauricio \(Maujor\) Samy Silva" <css.mau...@gmail.com> wrote: > Sintax for the selector is: > > $('img[style="overflow: auto; width: 356px; height: 100px;"]') > > Maurício > -----Mensagem Original----- > De: John > Para: jQuery (English) > Enviada em: terça-feira, 25 de agosto de 2009 14:36 > Assunto: [jQuery] jQuery selector for style attribute > > Hi, > > I want to select the following image using jQuery selector to see if I > could use the style attribute, > > <img id="ext-gen439" class="x-form-trigger x-form-arrow-trigger" > style="overflow: auto; width: 356px; height: 100px;" src="images/ > s.gif"/> > > but seems the selector > > img[style=overflow: auto; width: 356px; height: 100px;] > > does not work at all. What would be the correct selector for the style > attribute? > > Thanks in advance, > > John