jquery .show() and .hide() not working in safari - adding spinner to <a

前端 未结 6 1442
清酒与你
清酒与你 2021-01-17 15:55

I have some very basic code that acts as a loading gif for a webpage:

The loading and content containers sit in my base template. The


//header         


        
6条回答
  •  遇见更好的自我
    2021-01-17 16:48

    Sorry haven't tried reproducing your bug but unless you must use elem.hide() and elem.show().

    Alternatively, You can work with addClass and removeClass functions

    $('#loading').addClass('hide');
    $('#loading').removeClass('hide');
    

    with .hide { display: none; }

    works perfectly on safari too.

提交回复
热议问题