views:

507

answers:

2

I am relatively new to using JQuery and would like to use the load method to pull in content into my page as the site I am hosting with does not support any server side scripting.

I want to to be able to run more JQuery on the pages that are being pulled in (via the load method) such as the accordian in the UI library. How would I get this to work?

Cheers in advance

+3  A: 

the $.load method has a callback. This will be invoked when the data has been returned so you can instantiate your ui controls in this callback method.

For example

   //Load html page with Accordian markup
    $('#someDiv').load(urlWithAccordian, function(){
        //Create Accordian
        $('#someUL').accordian();
    });
redsquare
Thank you once again! =]
Malachi
+3  A: 

Change hosts! You should never have to rely on JavaScript for something as rudimentary as content!

J-P
I will suggest this - the current host seems to support absolutely no scripting at all which is really bad.
Malachi