title: How to add and remove event in jQuery?
body: <p>I have an image that has an InnerHTML for "a href" tag define in the .cs file as shown below.</p>
  
  <pre><code>HtmlGenericControl _divToolTipContainer = new HtmlGenericControl("div");
  _divToolTipContainer.InnerHtml = "&lt;a href=\"javascript:__doPostBack('" + btnItemThumbnail.ClientID.Replace("_", "$") + "','')\"&gt;" +
                                &lt;img src='" + string.Format("ItemPreview.axd/{0}/width-250/height-328/", item.ID.ToString()) + "'&gt;&lt;/a&gt;;
  </code></pre>
  
  <p>Now what I want is to have this "a href" event "remove" say if condition is (false) else "add" the event again by using jQuery. Sample code is shown below.</p>
  
  <pre><code>var objectDiv = document.getElementById(oElementId);    // get the object id 
  
  If (false){ // condition here
      remove the event of the a href tag..
      jquery code must be added here..
  }else{
      add the event again of the a href tag..
      jQuery code must be added here..
  }   
  </code></pre>
  
  <p>How to do this?</p>
  
  <p>Thanks</p>
  
  <p>Jason</p>