title: Registering jQuery with ScriptManager
body: <p>I am using the <a href="http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm" rel="nofollow">Dynamic Drive 'Animated Collapsible DIV v2.4'</a> script - My page has 8 div's each of which I wish to be able to expand and collapse.</p>
  
  <p>I register the jQuery from <code>Page_Load</code> as follows: (I also tried in <code>Page_PreRender</code> but same problem)</p>
  
  <pre><code>ScriptManager.RegisterClientScriptInclude(Me, Me.GetType, "AnimatedCollapse", Page.ResolveUrl("~/include/animatedcollapse.js"))
  ScriptManager.RegisterClientScriptInclude(Me, Me.GetType, "BensJQuery", Page.ResolveUrl("~/include/BensJquery.js"))
  </code></pre>
  
  <p>The <code>animatedcollapse.js</code> file is what was downloaded from the Dynamic Drive website. <code>BensJquery</code> is a file with the main <code>$(document).ready(function () {</code> handler which initialises the animated collapse script.</p>
  
  <p>Without using an <code>UpdatePanel</code> on my page, this is <strong>working perfectly</strong>.</p>
  
  <p>However when I introduce an <code>UpdatePanel</code> to the page which contains all the 8 <code>&lt;div&gt;</code> elements, the page no longer functions as expected.</p>
  
  <p>When I cause a postback (e.g. click a button), the functionality all breaks. All the <code>&lt;div&gt;</code> elements collapse and cannot be expanded again, the page just generally breaks, but there are no JavaScript errors displayed or .NET errors in the events viewer.</p>
  
  <p>What do I need to do so that I can use an UpdatePanel successfully with this jQuery?</p>
  
  <p><strong>EDIT</strong><br>
  I have solved this problem by not using one all-encompassing <code>UpdatePanel</code> but instead using them more sparingly and only when needed, which is probably quite a bit better now anyway.</p>
  
  <p>Thanks,<br>
  bgs264</p>