On Wed, Dec 10, 2008 at 3:19 AM, Max <[EMAIL PROTECTED]> wrote:

>
> Thanks ive used delegation to fix the links that are created by ajax,
> but i still cant seem to figure out how to update 2 div's using .load
> ajax function


In this case I would recommend using .get() instead of .load(). Then in your
.get() callback, you can pick out each piece of the returned page and load
them into each div.

... at the moment i have:
>
>  $("#clickrate").fadeOut("fast");
> $('#clickrate').load("http://www.site.com/mypage #clickrate", function
> () {
>
>            $('#clickrate').fadeIn("slow");
>
>
>            });
>
> but i want to also update another div,"userrate", i cant seem to do
> this... i tried this but it didnt work:
>
>    $("#clickrate").fadeOut("fast");
>        $("#userrate").fadeOut("fast");
>         $('#clickrate,#userrate').load("http://www.site.com/mypage
> #clickrate,#userrate <http://www.site.com/mypage#clickrate,#userrate>"


One way to rewrite this would be

$("#clickrate").load(url, fn)
$("#userrate").load(url, fn)

Maybe that will help you see why it's not working. You're giving the same
url to load into each element.

- Richard

Reply via email to