Friday, October 31, 2008

[jQuery] Re: Newbie - is there a better way to do this?

> Then my javascript is like this:
>
> function load_progressives() {
>         $(".progressive").each(function(n) {
>                 var wrapset = $(".progressive").slice(n)
>                 wrapset.load(wrapset.attr('href'))
>         });
>
> }

This should work:

function load_progressives() {
$(".progressive").each(function() {
$(this).load(this.href);
});
}

No comments: