Is it safe to include a jQuery script by using the asp.net method ClientScriptManager.RegisterStartupScript ?
http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx
As example within a Page:
this.ClientScript.RegisterStartupScript(typeof(string), "script1", "$('#test').hide();", true);
Could this cause any issues?
Thanks
Yes it is safe as the script is added at the end of the page so you may assume that you could manipulate the DOM as it is already loaded and you don’t need to wrap your calls in a
$(document).ready.