Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
36882 Points
5451 Posts
Jun 10, 2010 01:47 PM|LINK
RegisterClientScriptBlock paces the javascript code right after the <form> element. if your div is not defined before the form, then when the code runs it does not exists. try:
scriptText = "$(function(){$('#asd').toggle(1000);});";
this will telll jQuery to defer running the code until the after the dom loads.
bruce (sqlwo...
All-Star
36882 Points
5451 Posts
Re: JQuery from codebehind via ClientScript.Register... ?
Jun 10, 2010 01:47 PM|LINK
RegisterClientScriptBlock paces the javascript code right after the <form> element. if your div is not defined before the form, then when the code runs it does not exists. try:
scriptText = "$(function(){$('#asd').toggle(1000);});";
this will telll jQuery to defer running the code until the after the dom loads.