Reputation: 516
As we know window.onload
event will fire only when the page is completely loaded.
I want to perform some action when a partial view
loaded completely into div tag
how to check that?
like : $('divID').
__ ??
Upvotes: 0
Views: 246
Reputation: 2550
You need something like:
$('#divID').ajaxComplete(function(){
// do something
});
That is of course providing I am correct in my assumption: that you are using both AJAX to populate the DIV and also the Unobtrusive Ajax library rather than the Microsoft MVC Ajax libraries.
If the Partial is simply rendered on page load, then $(document).ready(function(){}) will serve you well.
Upvotes: 1