[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread Sam Collett
Using $(td.Name) should also improve the scripts performance as well. When you use $(.Name) it will go through all tags on the page. If the class name is on other tags as well, you could always add another selector (e.g. $(td.Name, li.Name). On Jun 11, 3:02 am, Dan G. Switzer, II [EMAIL

[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread Dan G. Switzer, II
Using $(td.Name) should also improve the scripts performance as well. When you use $(.Name) it will go through all tags on the page. If the class name is on other tags as well, you could always add another selector (e.g. $(td.Name, li.Name). The best thing to do would be to cache those values,

[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread Dan G. Switzer, II
this test : if( tbxValue != lastTbxValue ) will always return false because the function each() monoplize the unique thread. The event onkeyup from the textbox couldn't occur while each() is running, so tbxValue remains the same in the meantime. As I stated, you'll want to use a setTimeout() to

[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread mathmax
It doesn't work : I write this : input type=text name=tbxSearch id=tbxSearch class=textbox onkeypress=return disableEnterKey(event) onkeyup=tbxValue =this.value.toLowerCase();setTimeout('tbxSearch_keyup()',0); / var instance_fonction = 0; function tbxSearch_keyup() { instance_fonction++;

[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread Dan G. Switzer, II
function Populate(instance_en_cours) { rowsToShow = culmsName.contains(tbxValue).parent(); rows.not(rowsToShow).each(function(){ if(instance_fonction!=instance_en_cours) { return false; alert(interruption);

[jQuery] Re: jquery is'nt very effective at execution

2007-06-11 Thread mathmax
yes, but why doesn't interruption work even if the callback function fromonkeyup event is called with a setTimeout ? Dan G. Switzer, II wrote: function Populate(instance_en_cours) { rowsToShow = culmsName.contains(tbxValue).parent(); rows.not(rowsToShow).each(function(){

[jQuery] Re: jquery is'nt very effective at execution

2007-06-10 Thread Dan G. Switzer, II
http://fra.orkos.com/produits/tarifs.aspx Here is a page which I made. This page presents a list of products classified in a hierarchy. I have a textbox that allows the user to filter these products. Try to type a text in this textbox (for example the word apple) and observe the speed of

[jQuery] Re: jquery is'nt very effective at execution

2007-06-10 Thread mathmax
Thank you. Is it possible to interrupt the script each time the user enter a new letter in the search box ? Dan G. Switzer, II wrote: http://fra.orkos.com/produits/tarifs.aspx Here is a page which I made. This page presents a list of products classified in a hierarchy. I have a textbox

[jQuery] Re: jquery is'nt very effective at execution

2007-06-10 Thread Dan G. Switzer, II
Thank you. Is it possible to interrupt the script each time the user enter a new letter in the search box ? What I'd recommend doing is building in a setTimeout() delay that would only fire off the event if the user pauses typing--that way you're not trying to fire it off for every keystroke.