Guest User

Untitled

a guest
Jun 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. jQuery("#body").load("/boby_content")
  2.  
  3. // Global functions
  4.  
  5. // ajax
  6. jQuery.ajax({
  7. type: "POST",
  8. url: "/articles",
  9. data: "page=1&per_page=10",
  10. success: function(msg){
  11. alert( "Data Saved: " + msg );
  12. }
  13. });
  14.  
  15. // get
  16. jQuery.get("/articles", function(data){
  17. alert("Data Loaded: " + data);
  18. });
  19.  
  20. // post
  21. jQuery.post("/articles", { parent_id: 7, visible: 1 }, function(data) {
  22. alert("Data Loaded: " + data);
  23. });
  24.  
  25. // getJSON
  26. jQuery.getJSON("/articles.js", { page: 1, per_page: 10 }, function(json){
  27. alert("JSON Data: " + json);
  28. });
  29.  
  30. // getScript - Load JavaScript file and execute it.
  31. jQuery.getScript("/articles.js");
Add Comment
Please, Sign In to add comment