I don't ever use absolute selectors like that. The most general I get
is using a class as the selector. I've made a few tweaks (such as
moving a large block of code from inside the return this.each section
of the plugin to before it) on both the plugin and the page I'm using
it on, which seems to h
Hi,
To improve efficiency, try using contexts in order to restrict the
parsed DOM elements.
For example, if you know that all targeted elements are in . stuff .. target text... . then you should guide the selector engine towards the
target : $('#main .myclass '). Another synataxe
And I think I've fixed this.. I'm not sure how to describe what it is
that I fixed, but performance is vastly improved, although it still
slows down a little bit with an absurd amount of possible inputs. If
anyone wants to take a look at my code and optimize it further, please
let me know.
Thanks.
I just ran a page with an absurd amount of inputs through the Firebug
profiler and it seems that the majority of the time spent running
scripts is inside jQuery's (I'm using 1.4a1) Sizzle selector, which
makes me think I'm inefficiently using selectors (which I can almost
guarantee is the case).
A
4 matches
Mail list logo