Jquery hide div upon success call back - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:hide

Description

Jquery hide div upon success call back

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//w  ww  .ja  v a  2s.c om
$('#go').click(function() {
    $.post(
        '/echo/html/',
        { html: '<p>aaa</p>' },
        { callback: function(data) { $('#go').after(data) } }
    );
});
    });

      </script> 
 </head> 
 <body> 
  <button id="go">click</button>  
 </body>
</html>

Related Tutorials