SHARE
TWEET

Untitled

a guest Aug 2nd, 2016 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // WPML ajaxurl
  2. var ajaxurl = '/wp-admin/admin-ajax.php?lang=fr';
  3.  
  4. // Les paramètres en $_GET
  5. var data = {
  6.     action: 'mon_action',
  7.     _ajax_nonce: $('#nonce').val()
  8. }
  9. $.get(ajaxurl, data).done(...) // url: /wp-admin/admin-ajax.php?lang=fr&action=test&_ajax_nonce=eeeeeee
RAW Paste Data
Want to get better at JavaScript?
Learn to code JavaScript in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top