日期:2014-05-16  浏览次数:20629 次

jquery中ajax的全局函数 怎么会影响样式啊!!
JScript code
$('footer').ajaxStart(function(){
        $('#main button').text('投票中').css({'background':'#aaa','text-indent':0});
    $('#main dd.photo').append('<img src="image/spinner.gif" class="l"/>');});
$('footer').ajaxStop(function(){
        $('#main button').text('vote').css({'background':'#d4a6d7 url(image/beautiful.png) 50% 50% no-repeat','text-indent':'-9999em'});
    $('#main dd.photo img.l').remove();
});

为什么我在ajax请求中添加这两个函数后,我的按钮的:hover样式没用了?好奇怪啊。。。求各位大神指教

------解决方案--------------------
你指定下它的class好了,$('footer').addClass("xx")这样行不行