Damn, sorry for the multiple posts! Google Groups kept saying there was an error with making my post, I guess it eas wrong. Groups seem to have been rather flaky in general lately.
On May 22, 4:29 pm, Gordon <[EMAIL PROTECTED]> wrote: > I am writing a script that scans a list of items that each contain > form fields and doing something based on the value of the field in > each item. I came up with the following code, which does seem to work > as intended, but execution can take upwards of 500ms, which I feel is > rather slow. > > var container = '#myElem'; > > $(container.children ()).each (function () > { > thisVal = parseInt ($('[EMAIL PROTECTED]"quantity"]', this).attr > ('value'), > 10); > // Do stuff > > }); > > Obviously the fields can't have the same ID as that would break the > validity of the HTML. Field names do not have to be unique so it > seemed logical to use them as the basis of selecting the collection of > elements to work with.