[jQuery] More efficient way to find Parent element

2009-01-16 Thread Coryt
after learning the difference between parents and parent, I am having to resort to using parent(), but it's not very clean. Consider the following table, which is embedded in a page, which may have additional tables (for this reason I cannot use parents("table") because it returns multiple tables

[jQuery] Re: Poor Performing jQuery .each()

2008-10-08 Thread Coryt
Sorry for the last question, I realize what is happening now. It seems to be a quirk of the .html() which only ouputs the inner html, so it's not a problem with the clone like I originally thought.

[jQuery] Re: Poor Performing jQuery .each()

2008-10-08 Thread Coryt
I noticed something else that is a little weird when cloning. If I execute the following snippet, I see the table tags and all the inner html: var $template = $("#LineItemsTableTemplate").clone() alert($template.html()); Item Code Price Level De

[jQuery] Re: Poor Performing jQuery .each()

2008-10-08 Thread Coryt
Dave, missed your last question, yes, because of the initial performance issue I was having, I was limiting my SQL resultset to be exactly 100 and if there were more rows available, I appended a blank row making 101 rows all the time. Therefore I could always tell that if I had 101 rows, more reco

[jQuery] Re: Poor Performing jQuery .each()

2008-10-08 Thread Coryt
Thanks for all the tips Michael and Dave, very much appreciated. Michael, to answer your questions, there is a way to get the .Net generated prefix, and I did mean to use insertAfter. It rendered correctly in IE but not in FF so I didn't notice it immediately. I have been busy with a few other t

[jQuery] Re: Poor Performing jQuery .each()

2008-10-07 Thread Coryt
Ah, yes, sorry, the @ selectors are because I am using .net, which alters rendered control ID values. Therefore I need to search for the end of the ID. >From what i read and as you noted, the selector $( "[EMAIL PROTECTED]" + GPRowID + "]", "[EMAIL PROTECTED]" ), would use "[EMAIL PROTECTED] $=gvB

[jQuery] Re: Poor Performing jQuery .each()

2008-10-07 Thread Coryt
ore > elements? If I can see those I can suggest something more specific. > > Actually, it would help a LOT if you could put up a complete test page, that > way I don't have to play 20 questions... ;-) > > -Mike > > > > > From: Coryt > > Actually the data i

[jQuery] Re: Poor Performing jQuery .each()

2008-10-07 Thread Coryt
Actually the data is being returned as json. sample data: [ { "LineItemType":2, "DocumentNumber":"COM", "Description":"DREG09-rbl2105-1000.com", "SubTotal":7.74000, "TaxTotal":0.39000, "Total":8.13000, "Quantity":1.0 }, {

[jQuery] Poor Performing jQuery .each()

2008-10-06 Thread Coryt
I am having some trouble tracking down why this relativily simple client-side template is performing so poorly. Using js to make an ajax call and retrieve a small amount of data, limited to 100 rows being returned. I've tracked the problem down to the actual jQuery iteration, here is my code: f