I have no last resort. It's like, when you lose your keys (to your house or car, for example), you always find them in the last place that you look.
As for the other issue, why do I consider what sloppy? Have you written much code for jQuery? In any case, I may not have been clear about that, consider:
Code:
$('.marquee').each(function(i){
do something(s) here one at a time with each element that has a class name of marquee,
while you are at it, the index of that element will be i, and the element
itself will be this, extensible as another array object with one member but many
properties by doing $(this).
});
Now the this keyword cannot be easily used to refer to an object other than the element, and i is reserved for the index of that element in an array, so you will be tempted to use it (i) to differentiate processes which can be better done with a constructor function or object of your own devising.
* javascript:alert($(document).html)
outputs:
Code:
function (E) {
return E === g ? this[0] ? this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : null : this.empty().append(E);
}
Bookmarks