jQuery ready event not fired on partial page load
How are you firing the AJAX request to the server? If you're using ASP.NET AJAX, then Brian Hasden's answer is what you are looking for. If you are using jQuery to send the request, then you can either set a call back using the load function.
$(".ajaxLink").load(url, null, function() { // code here});
or set a global ajaxComplete event that is fired every time an ajax call is complete.
$(document).ajaxComplete(function() { // code here});
OK.. so i have a simple answer to this problem now, which should mean minimal code changes. Rather than the sub views (these are real aspx views which have no html, head or body tags) having a js include (essentially the client side behaviour model) which responds to $(document).ready, we can use the suggestion from mkedobbs to provide something similar. Simply:
$("#MyDiv").load("page.htm", null, function(){ $(document).trigger("PartialLoaded"); });
Then in the sub view js include
$(document).bind("PartialLoaded", function(){ .........});