collecting medal for hitxy members
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

41 lignes
1.1KB

  1. (function ($) {
  2. // http://davidwalsh.name/javascript-debounce-function
  3. function debounce(func, wait, immediate) {
  4. var timeout;
  5. return function () {
  6. var context = this, args = arguments;
  7. var later = function () {
  8. timeout = null;
  9. if (!immediate)
  10. func.apply(context, args);
  11. };
  12. var callNow = immediate && !timeout;
  13. clearTimeout(timeout);
  14. timeout = setTimeout(later, wait);
  15. if (callNow)
  16. func.apply(context, args);
  17. };
  18. };
  19. /*______________________________________________________*/
  20. $(function () {
  21. $('#test').html(mm.display_name);
  22. console.log(mm);
  23. });
  24. $(document).on("click", "#step1", function(){
  25. $.post(mm.ajax_url, { // POST request
  26. _ajax_nonce: mm.nonce, // nonce
  27. action: "list_users", // action
  28. client : 333,
  29. }, function(response, status, xhr){
  30. alert(response);
  31. }).fail(function(){
  32. alert('network error ');
  33. });
  34. });
  35. })(jQuery);