I have a problem with an accordion not working when receiving contents from another page via AJAX. THe page is this one: http://jbm.utad.pt/testes/tempo/index.php
As soon as the page loads it sends a default city name to processtempo.php which with AJAX shoots the results back to a div:
In the processtempo.php I have the HTML for an accordion but the jQuery for it is in index.php. Is this accordion not working because the HTML have to be in the main page or did I screw up with the jQuery?
You can view the accordion jQuery script in the source… I haven’t yet put it in specific js file.
Thanks so much for all the help possible and sorry for this vague question
Cheers
You are assigning a
click()event to.tempo-head, and doing a bunch of other things to elements before they are loaded onto the page by the ajax routine.You’ll need to get the latest version of JQuery for the following to work. I noticed that you have an outdated version currently (1.4.2)
Try changing this:
to
OR
Move all your accordion routines to inside the
successcallback in your ajax call like below.