title: How to call function on post back
body: <p>I have made function to add class on a div which is working fine. But when another function call postback then my added class is removed from the div because it reload the page. So I want to call my function on postback or after postpack. example function is given below</p>
  
  <pre><code>&lt;head&gt;
  &lt;style&gt;
  .test{ background:#F00}
  &lt;/style&gt;
  &lt;script type="text/javascript" src="jquery-1.8.3.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(function(){
  $('a').click(function(){
  $(this).addClass('test')
  })
  })
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a href="javascript:void(0)"&gt;click&lt;/a&gt;
  &lt;div&gt;check....&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>