[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 jian.fang.subscr...@gmail.com wrote: Seems I should use css(), not attr(). On Aug 27, 3:46 pm, John jian.fang.subscr...@gmail.com wrote: Seems always begin with

[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 jian.fang.subscr...@gmail.com wrote: Also, it is not possible for us to use Ids because the ids are dynamically

[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 jian.fang.subscr...@gmail.com 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.

[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; height:

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
Thanks. Here is the html source, div id=x-form-el-ext-comp-1043 class=x-form-element style=padding-left: 130px; div id=ext-gen438 class=x-form-field-wrap style=width: 360px; input id=programId type=hidden name=programId value=/ input id=ext-comp-1043

[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

[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 james.gp@gmail.com wrote: As Paolo mentioned, despite how it looks in a browser's source, the internal representation within the DOM may be different

[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

[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

[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;

[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

[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