开发者

Problem on removing the class of jquery script after the content is loaded

开发者 https://www.devze.com 2023-02-21 06:04 出处:网络
I have the following code that gets the value of a drop down list and displays the value.php and valueb.php files in different divs. I already added a loading class, but I can\'t remo开发者_如何学JAVA

I have the following code that gets the value of a drop down list and displays the value.php and valueb.php files in different divs. I already added a loading class, but I can't remo开发者_如何学JAVAve it when the page is loaded.

I tried .removeClass('loading') before the end of statement with no result (when i add the removeclass, the pic is not loading).

The follow displays the loading pic onChange and stays showing. Thank you.

    $('#result').empty().addClass('loading').load(val + '.php');


Try

 $('#firstresult').empty().addClass('loading').load(val + '.php', function(){$('#firstresult').removeClass('loading'); });
0

精彩评论

暂无评论...
验证码 换一张
取 消