Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <script type='text/javascript'>
  2.  
  3. $(document).ready( function(){
  4. $(':not(#mystub)').click( function(){
  5. $(this).remove();
  6. });
  7. }); /// this is the bracket you were missing! if yo do it like this they should line up. ;)
  8. $('#sub').live('click', function(){
  9. $.post('ajax.php',
  10. {name: $('#personName').attr('value') },
  11. function(returnedData){
  12. $('#mystub').empty().append("<div id=specialdiv>"+ returnedData +"</div>");
  13.  
  14. });
  15. });
  16.  
  17. $('#closebutton').live('click', function(){
  18. $('#specialdiv').fadeOut();
  19. });
  20.  
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement