I'm not sure I quite understand the problem you're having, but it sort
of sounds like you could solve the problem by putting code you want to
execute after content is loaded into the callback function of the ajax
load method.
So, using your words below, ajax load the external load file into the
DOM first and then run the JS that is expecting the loaded html. For
example:
$('#someID').load('/path/to/file',
function() {
// run the JS here, now that the ajax loaded content is available
});
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Oct 9, 2009, at 12:02 PM, dylanmac wrote:
Anyone? No one can answer this? Seems like this must come up all the
time.
On Oct 6, 1:17 pm, dylanmac <dylan...@gmail.com> wrote:
I have a set of jqueryui tabs that, when clicked, load in their
content dynamically. It works great, except that one of the pages
uses
a jquery plugin itself. This results in two issues:
- The main page that holds the tabs throws an error when loaded
because there is js that refers to elements that haven't loaded yet
(those elements are in the external file that contains the code that
relies on the plugin).
- If I embed the js that triggers the plugin functionality into the
external file, it is outside of the document.ready function from the
main page and therefore isn't usable.
Basically I am looking for a technique that allows me to ajax load an
external html file into the DOM while not crapping out the main page
itself because JS that is already there is expecting HTML which is
not
yet there.
Thanks.