In Mootools et al. it is really easy to select all elements in the DOM
with a given attribute, such as CSS class. In Mootools this is
var listOfDivsWithClassRED = $$(.RED)
I have a need to select all the elements on a page with a given
attribute and value and I'm trying to mimic Mootools
How about using GWTQuery? It's easy to use (very similar to your
Mootols example), and it's highly optimized for speed (individually
for different browser).
http://code.google.com/p/gwtquery/
On Jun 24, 11:46 am, Paul Schwarz paulsschw...@gmail.com wrote:
In Mootools et al. it is really easy to
On 24 juin, 11:46, Paul Schwarz paulsschw...@gmail.com wrote:
In Mootools et al. it is really easy to select all elements in the DOM
with a given attribute, such as CSS class. In Mootools this is
var listOfDivsWithClassRED = $$(.RED)
I have a need to select all the elements on a page with a
Thanks for your replies.
@Thomas, I see now how they are of course raw DOM elements. I will try
compile and run in a browser and measure the performance, it ought to
be a lot quicker.
I took a brief look at GWTQuery, it looks good, but seems to be an
implementation of the entire jQuery library?
Don't worry about adding the entire GWTQuery library - the GWT
compiler takes care of outputting only the code parts it needs from
that library. This often means, that your code size will only increase
by a few hundred bytes.
On Jun 24, 12:47 pm, Paul Schwarz paulsschw...@gmail.com wrote:
Got ya! Just testing the speed of the compiled version of my
implementation now and then I'll move onto GWTQuery in a few minutes.
On Jun 24, 1:54 pm, Chris Lercher cl_for_mail...@gmx.net wrote:
Don't worry about adding the entire GWTQuery library - the GWT
compiler takes care of outputting
Oh I'm such a tool! There I was trying to shave 5500ms down to 3000ms
and down even further... I compiled into javascript and tested in
Chrome and my execution times hover anywhere between 0ms and 2ms!!!
High 5's all around!
But getting back to GWTQuery, it looks interesting, but now that I've
On Jun 24, 1:08 pm, Paul Schwarz paulsschw...@gmail.com wrote:
But getting back to GWTQuery, it looks interesting, but now that I've
solved my Element selector woes why else should I delve into
GWTQuery?
No need to do that, but GWTQuery provides the easy selector syntax you
mentioned in your
Thanks very much for that info, I'm sure it will come in handy any day
now. For the moment I have kept aside my home-made selector system in
favour of simply keeping an ArrayList of element IDs. I know the IDs
of the elements I'm creating because as I create the elements I am
giving them and ID