Guest User

Untitled

a guest
Oct 23rd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $(function(){
  2. var new_data = '';
  3. $.post('my_url', {}, function(data){
  4. new_data = data;
  5. });
  6.  
  7. console.log(new_data);
  8. });
  9.  
  10. $(function() {
  11. var new_data = '';
  12. $.post('my_url', {}, function(data) {
  13. new_data = data;
  14. console.log(new_data);
  15. });
  16. });
  17.  
  18. $(function() {
  19. var new_data = '';
  20. $.post('my_url', {}, function(data) {
  21. new_data = data;
  22. response(new_data);
  23. });
  24. });
  25.  
  26. function response(new_data) {
  27. console.log(new_data);
  28. }
Add Comment
Please, Sign In to add comment