I have a page dashboard.asp
It opens a dialog and using ajax loads... profile.asp
Within profile.asp
there are various jquery functions relating to the functionality of the profile. All is well accept Safari will not not load $(document).ready
in the loaded content.
A secondary question would be should I be including <script src="jquery.js"></script>
in the ajax loaded page as well as the parent page.
Code within dashboard.asp
<script language="javascript">
$(document).ready(function(){
$("a[rel=profile]").live('click',function() {
var profileURL = $(this).attr('href');
var title = $(this).attr('title');
$.ajax({
url: profileURL,
cache: false,
success: function(data) {
$( 'html, body' ).animate( { scrollTop: 0 }, 0 );
$("#overlayer").fadeIn();
$('#profile_menu_wrapper').load('/profile.asp',{a:title},function(){
$('#profile_menu_wrapper').fadeIn(1000);
$("#profile").html(data);
$("#profile").fadeIn(1000);
});
}
});
return false;
});
});
</script>
Which works fine and opens a dialog as I wanted...
But the code within profile.asp
<script language="javascript">
$(document).ready(function(){
alert("Ready")
});
</script>
Does not run...