omega
omega

Reputation: 43833

How to run javascript after jquery and dom has finished loading in c#?

In my asp.net/c# solution, I am loading the jquery library with this

<SharePoint:ScriptLink ID="jquery_js" name="/_layouts/PDF Library/jquery-1.10.1.min.js" runat="server" OnDemand="False" Localizable="False" />

Now, in c# code, how can I insert javascript, that will only run when the jquery library is done loading and the dom is finished loading too. I can insert javascript like this:

ScriptManager.RegisterStartupScript(someControl, typeof(string), "AutoComplete", js_call, true);

Thanks.

Upvotes: 0

Views: 517

Answers (1)

bobek
bobek

Reputation: 8022

$(window).load(function(){
   //this will run after dom is loaded
});

Upvotes: 1

Related Questions