Jquery Ajax loading Problem

Posted by Starx on Stack Overflow See other posts from Stack Overflow or by Starx
Published on 2010-03-17T00:30:39Z Indexed on 2010/03/17 0:41 UTC
Read the original article Hit count: 265

Filed under:

I have a function to load a html part into a element in main index page kinda like this

$(".ajax").click(function() {
         //load a page into a element
});

This works But the HTML part which i have just loaded also have links that need to trigger same function above, but it does not.

Until I save that function in a separate .js file and load in the main index file as well as all other files from where I need to trigger that function even though these internal files are going to loaded into the the first main file .

Is there any way for a function in the index file to run from the html document that is loaded inside a element.

© Stack Overflow or respective owner

Related posts about jquery-ajax