Posted By

kkw on 04/27/13


Tagged


Versions (?)

AJAX Request


 / Published in: jQuery
 

لو عندي الأجاس فوت بيبعت variable اسمه output ليه مش عارف أستخدمه في فنكشن تانية؟

  1. $(function() {
  2. $('.voteUp').click( function() {
  3. var commentID = $(this).attr("alt");
  4. var commentVotes = $('#status-'+commentID).text();
  5. ajax_vote(commentID, 1);
  6. if(output == 'case 1') { console.log ('case 1'); }
  7. });
  8.  
  9. function ajax_vote(commentID, commentVotes){
  10. $.ajax({
  11. type: "POST",
  12. data: {comment: 24, vote: commentVotes, post: 24 },
  13. url: "/wp-rate-answers/ajax_request.php",
  14. success: function(output) {
  15. return output;
  16. }
  17. });
  18. return false;
  19. }
  20.  
  21. });

Report this snippet  

You need to login to post a comment.