I had the same issue.  It is a timing issue and you need to make sure
your accordian is re-initialized after the ajax call is complete.
Here is an example of what I have that works for me:

  $("#spp_link").click(function ()
  {
    $("#financial_content").load("/calculate/loadFinancial/id/1/type/
spp");

    $("#financial_content").ajaxComplete(function(request, settings)
    {
      $("div.accordion").accordion();
    });
  });

Here are the docs on the ajaxComplete event:

http://docs.jquery.com/Ajax/ajaxComplete#callback

You will undoubtedly need to adjust this to your situation, but I hope
it helps.

Duane Gran

On Apr 6, 6:25 pm, martinfcasey <[email protected]> wrote:
> i think i'm running into an issue, implementing a simple "accordian"
> widget from the jquery-ui library, because i'm loading content after
> the page has loaded, withajax.
>
> i've posted 2 example, one of which works (test1), the other doesn't
> (test2)... the only difference (see the source) is that test2 loads
> theaccordiancontent with the jquery load function.
>
> http://caseyis.com/jquery/test1.html
>
> http://caseyis.com/jquery/test2.html
>
> you'll notice that the content loads fine, but it's not styled as a
> jquery-uiaccordian.
>
> from what I've been able to understand, from combing the forums, is
> that i need to reinitialize things after theajaxfunction calls
> back...
>
> i've been able to do this with regular (click) events (with
> livequery), but am confused on how to reinitialize jquery-ui, after
> the dom has updated.
>
> your help is much appreciated.
>
> - martin.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to