I am trying to make a counter in jquery something like this…
for(counter = 1;counter<4;counter++){
}
would this work?
Well I am just saying the loop as a test…what I am ultimately trying to do is remove duplicate images from this code…
// Preloads images within a rel group
if (settings.preloading) {
preload = [
getIndex(-1),
getIndex(1)
];
while (i = $related[preload.pop()]) {
src = $.data(i, colorbox).href || i.href;
if ($.isFunction(src)) {
src = src.call(i);
}
if (isImage(src)) {
img = new Image();
img.src = src;
}
}
yes, I would do
to be more explicit.