Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <script type='text/javascript' data-main="js/config" src='node_modules/requirejs/require.js'></script>
  2. <script type='text/javascript' src='js/app.js'></script>
  3.  
  4. requirejs.config({
  5. baseUrl: "node_modules",
  6. paths: {
  7. jquery: "/jquery/dist/jquery.min"
  8. }
  9. });
  10.  
  11. require(['jquery'], function($){
  12.  
  13. $('.event-form').on('submit', function(e){
  14. e.preventDefault();
  15.  
  16. $.ajax({
  17. type: "POST",
  18. url: "/createevent.php",
  19. dataType: "json",
  20. data: {serviceKey: "some_service_key"},
  21. success: function (data) {
  22. console.log(data)
  23. }
  24. });
  25.  
  26. })
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement