I want to show loader till page not loaded or all Ajax call not completed in frontend and backend both side.

Is it possible in Magento 2.0.7 ?


You can try below ajax call for showing loader during ajax call is runnig.

    url: url,
    type: 'POST',
    dataType: 'json',
    showLoader: true //use for display loader 
}).done(function (data) {
    return true;
  • I want to call this for default ajax calling in Magento 2. I dont want to call my ajax. – Ashish Jagnani Sep 12 '16 at 9:37
  • use can use ajaxStart() and ajaxComplete() function for show and display loader. – Jaimin Parikh Sep 12 '16 at 10:41
  • I tried ajaxComplete() and ajaxStop() but both not working, don't know why. – Ashish Jagnani Sep 12 '16 at 10:58
  • Try my solution (I had the same question) magento.stackexchange.com/a/171485/40609 – Mykhailo Shatilov Apr 24 '17 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.