Tabs Embed HTML Page That Contains Javascript Best Practice

Tabs Embed HTML Page That Contains Javascript Best Practice

Hello, 
This is my first use of jQuery UI and I was really happy with how easy it is to get the Tabs up and running and loading external html pages.

I have read that, as the tab includes the entire linked document make sure that you exclude the html, title, body, head tags etc and only include what you want shown in the html file.

I was hoping someone could tell me the best practice for including javascript that will be used on these pages.

The scenario I am faced with is that I am using jQuery UI with tabs, a few of the tabs have graphs on them (using dygraphs) that I would like to load via external html files. Should I include all of the javascript for all of the graphs in the parent page? or should I include some of it in each individual graph html page?

Thankyou for your help.