hi, i am trying to select a objects that is generated with PHP through
jQuery AJAX. but its not working

any one please help me.
thank you

JQuery ::

$(document).ready(function(){

  $.ajax({

   type: "POST",
   url: "demo_cal.php",

   data: "fnum=2&snum=4",

   success: function(msg){
     $(".result").html(msg);
   }

 });


 $('#hide').click(function(){ // this is not selecting the #hide div
genarated from php
   $(this).hide();
  });

});

html body ::

<div class="result"></div>


in demo_cal.php ::

<?
if(isset($_POST['fnum']) & isset($_POST['snum'])){

echo "<div id=\"hide\" >". $_POST['fnum'] + $_POST['snum'] ."</div>";
}
?>

Reply via email to