SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    132
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    can .post converted to .ajax, I want use ajaxStart/ajaxStop?

    Code:
      
    
    $('#ajaxInProgress')
        .ajaxStart(function() { 
          $(this).addClass('progress'); 
        })
        .ajaxStop(function(){ 
          $(this).removeClass('progress'); 
        });
    the above applied only to : $.ajax({

    what is i have $.post(url, { like below???

    can .post converted to .ajax, I want use ajaxStart/ajaxStop?


    Code:
    	
    
    $('#send').click(function(){
          $.post(url, {
            email: $('#email').val(),
            subject: $('#subject').val(),
            comments: $('#details').val()
          }, function(response){  
    			finishAjax('userresult', response);
    			alert(response);
          });

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The jQuery post method is derived from the ajax method so all the same delegates should apply.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  3. #3
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    132
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    ajaxStart/ajaxStop i think not work for .post, do work?? i have to convert .post to .ajax????


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •