[jQuery] Use jQuery after a jQuery load
I've a little question maybe someone could give me a hint....
My problem is:
i want to build a site with a navigation (with jQuery = no problem)
which loads some content in a main-div-field.
This is absolute no problem with e.g.
load( url, data, callback )
or
$.ajax(
{ type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){ alert( "Data Saved: " + msg ); } });
and so on...
However, so i'm able to load some content in the div-container BUT
within the div field i would like to use jQuery AGAIN! And it doesn't
work :(
For exmple:
Inital start-site -> navigation:
<script>
$(document).ready(function(){
$("a#start").click(function ()
{ load( url, data, callback ......
});
</script>
so the content appears in the main div field...
And maybe the content looks like this:
<div id="start">
<script>
$(document).ready(function(){
$("a#test").click(function ()
....
});
</script>
<a href="#" id="test">test</a>
</div>
so the main problem is: when i load a div field which also contains
jQuery statements - it doesn't work. I also tried, to load the jQuery
statements in the initial site, so it only have to load the new
content but not the jQuery stuff but this also didn't work...
Does anybody know how this could work???