title: How to attach event call back for dynamic html
body: <p>Hi
  I have a jQuery onload function that attaches a function call on mouse over of some inline links based on its classname, also I wil load some html content dynamically using ajax, but the above function call attachment based on the classname is not working for the dynamic html, how to resolve this..</p>
  
  <p>My code will look like the following (actually in my code i load images instead of simple links)</p>
  
  <pre>
  
  $(function(){   
      $(".highlight").mouseover(function(){
          $(this).css("background-color", "rgb(255,255,0)");
      });
  
      $(".highlight").mouseout(function(){
          $(this).css("background-color", "rgb(255,255,255)");
      });
  
  
  });
  
  $(function(){
          //ajax call
          // set the ajax return value inside dynamic div
      $(".dynamic").html(""+new Date()+"");
  });
  
  &lt;body&gt;
      &lt;div>
          &lt;a href="#" class="highlight"&gt;link1&lt;/a>
          &lt;a href="#" class="highlight"&gt;link2&lt;/a>
          &lt;a href="#" class="highlight"&gt;link3&lt;/a>
      &lt;/div&gt;
      &lt;div class="dynamic"&gt;&lt;/div&gt;
  &lt;/body&lt;
  </pre>
  
  <p>Thanks
  venkat papana</p>