Blair,
Thanks for the advice. You may not have noticed my post that came
moments after the one you replied to where I'd figured out the
unnecessary use of eval on my own. I do try to avoid it. Also, while the
second loop may be able to be optimized, neither of the loops in this
case are
On 1/19/07, Christopher Jordan [EMAIL PROTECTED] wrote:
[..]
I don't really understand how to use filters. You're the second or third
person to mention them, and I did some reading yesterday, but I still don't
completely understand. [...]
I'm not familiar with CF but I'm going to try and
Hi folks,
I've tried narrowing down my selector criteria, but that didn't help
much. Then I tried Brian Miller's suggestion to get my selector into a
comma delimited list like this:
myDiv = $(.CalendarWrapper); // I'm doing this because there are three
calendars on screen
myCells = $([EMAIL
You can comma-delimit the selector, so you can package up all the td
elements you're looking for into one $ function.
Also, if you limit your context (to, say, the table in question), it'll
help speed things up.
mytable = $(#mytable);
FlexCells = $([EMAIL PROTECTED] + ShiftDate + ], [EMAIL
I've got a for loop in which I have jQuery select a different DOM
element for each iteration. The code I've got that selects the element is:
FlexCell = $([EMAIL PROTECTED] + ShiftDate + ]);
So far, it's taking about three seconds to complete a loop of fifteen
iterations. Yikes! :o( If
Brian,
The only problem I see with that is that the dates come from the object
that I'm looping over.
I maybe should have included the entire for loop in my original post:
for(i = 0; i ThisRecordCount; i++){
ShiftDate = {ts ' +
CFJS.ListFirst(FlexOrderData.data.SHIFTDATE[i],.) + '};
You can still start off by grabbing your table, and that will make each
individual search for a td quicker.
mytable = $('#mytable');
...
FlexCell = $([EMAIL PROTECTED] + ShiftDate + ], mytable);
Or, even better, you can grab all the td elements that have a dateValue in
the first place.
mycells
Thanks for the advice Brian. I hope it will too. What do you consider a
big DOM? I'm working with three calendars on screen at a time. Given a
three month span that's somewhere in the neighborhood of 90 cells (give
or take). Of course there's three divs on the right of those, and spans,
You should probably get an array of date values and then use a custom
filter function ... maybe something like this (untested):
var dateValues = ['date1', 'date2', 'date3'];
$([EMAIL PROTECTED]).filter(function() {
for (var i=0; idateValues.length; i++);
return
Thanks Brandon! I'll give that a shot when I get home. In the mean time,
anyone else have any other thoughts or has Brandon nailed it on the
head? :o)
Thanks heaps!
Chris
Brandon Aaron wrote:
You should probably get an array of date values and then use a custom
filter function ... maybe
10 matches
Mail list logo