[jQuery] Re: jQuery selector for style attribute

2009-08-28 Thread John
Got it working, see here, http://code.google.com/p/aost/wiki/CustomJQuerySelectorInTellurium#:styles On Aug 27, 5:57 pm, John wrote: > Seems I should use css(), not attr(). > > On Aug 27, 3:46 pm, John wrote: > > > Seems always begin with "ext-gen". > > > I wonder if I could split the style co

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread John
Seems always begin with "ext-gen". I wonder if I could split the style content into multiple single attributes and then use attr() to compare. Based on that, I could create a custom selector. Then the question is, for example, I have a style attribute such as "overflow: auto; width: 356px; heigh

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread John
Seems I should use css(), not attr(). On Aug 27, 3:46 pm, John wrote: > Seems always begin with "ext-gen". > > I wonder if I could split the style content into multiple single > attributes > and then use attr() to compare. Based on that, I could create a custom > selector. > > Then the question

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread James
Is that for the whole ID? (e.g. it maybe 'ext-gen439' once or 'blah- foo3456' another) Or only just the number at the end? (e.g. always begin with "ext-gen") On Aug 26, 5:10 pm, John wrote: > Also, it is not possible for us to use Ids because the ids are > dynamically > generated by the ExtJS fr

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
I am working on the open source project: Tellurium automated testing framework, which is a web testing framework built on top of Selenium. We leverage jQuery to add jQuery selector as a locator to speed up the test performance in IE and also add other new functionalities. More details could be fou

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
Also, it is not possible for us to use Ids because the ids are dynamically generated by the ExtJS framework. On Aug 26, 4:34 pm, James wrote: > As Paolo mentioned, despite how it looks in a browser's source, the > internal representation within the DOM may be different depending on > the browser

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread James
As Paolo mentioned, despite how it looks in a browser's source, the internal representation within the DOM may be different depending on the browser. In one browser it could be: overflow: auto; width: 356px; height: 100px; in another it could be: overflow:auto; width:356px; height:100px; in anot

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
Thanks. Here is the html source, The style in the jQuery selector should match the one defined in the html source. I wonder if I did any other thing wrong here. Thanks, John On Aug 26, 6:45 am, Paolo Chiodi wrote: > Maybe that t

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread Paolo Chiodi
Maybe that that the style attribute value should be exactly equal to the one contained in html. I think style="A:B C:D" doesn't match style="C:D A:B". May also be that the browser has an internal rapresentation of the style attribute slightly different from the one written in the html (never tried

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John
That may not be an option, at least now. The reason is that the jQuery selector is automatically generated by a framework, which may be rather random and difficult to set another class. The first thing is to get it work. As long as the syntax is correct, it should work fine, right? I care more a

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread James
Couldn't you just set another class for where you have that long style attribute? That'll make it so much nicer and less error prone for what you're trying to achieve. I'm not telling you that you need to remove the inline style, but just added another class on the element where you have the inlin

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John
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; he

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread Mauricio (Maujor) Samy Silva
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