2017-05-05 44 views
-1

我建立一個維基百科的觀衆,我有這個在我的代碼:ajaxStop /啓動不工作

$(document).ready(function() {   

    $(document).on('click', '#search_button', function() {   
     addWikiResults();   
    }); 

    $(document).keypress(function(enter) { 
     if(enter.which == 13) 
     addWikiResults();   
    }); 


    $(document).ajaxStop(function() { 
     alert('ajax stop now working');   
    }); 

    }); 

ajaxStop將不火都以及ajaxStart。除了那一部分,一切都有效以下是我的codepen:https://codepen.io/nuclearmachine/pen/xdXXKv?editors=1000 具體爲line 130

+2

請做搜索正確發佈提問同樣的問題問過http://stackoverflow.com/questions/18730526/jquery-global-and-local-ajax-events-are-not-firing這裏 –

+0

對不起,不知道谷歌是什麼,因爲谷歌搜索「ajaxStop」產生了成千上萬的結果,但不是我擁有的。我的意思是,我的代碼似乎是正確的,控制檯沒有錯誤號碼等。 – chaosfirebit

回答