开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜