title: After postback my JavaScript function doesn't work in ASP.NET
body: <p>I have common functions and I collapse it on <code>CommonFunctions.js</code> in Scripts folder.</p>
  <p>I include it on my master page and use it on my pages. When I do any post back on a page, my function doesn't work.</p>
  <p>My <code>CommonFunctions.js</code>:</p>
  <pre><code>$(function () {
  
      gf();
      
     if (Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
          
          gf();
      }
  
  
   function gf(){
  
      $('.AddNewGeneralPanel').click(function () {
  
          if ($(this).find('.AddNewGeneralPanelStyle').text() == &quot;&quot;) {
              $(this).find('.AddNewGeneralPanelStyle').text(&quot;(  Gizle  )&quot;);
              lastOpenId = $(this).attr(&quot;codeid&quot;);
          }
          else
              $(this).find('.AddNewGeneralPanelStyle').text(&quot;&quot;);
  
          $(this).next('.AddNewGeneralAccordionDiv').slideToggle('slow', function () {
  
          });
  
      });
    }
  });
  </code></pre>