function SelectedAnimation(that) { var temp = $(that).clone(); $(temp).insertAfter($(that)); var w = $(that).width(); /** * 加入试题飞入效果 */ var imgTop = that.offset().top - (document.documentElement.scrollTop + document.body.scrollTop) that.css({ "position": "fixed", "z-index": "9999", "left": that.offset().left + "px", "top": imgTop + "px"}) .css("border", "1px solid #333") .css("background", "#EAFDF5") .css("width", w); that.animate({ "left": $("[hex-totalexscore]").offset().left + 20 + "px", "top": ($("[hex-totalexscore]").position().top + 20) + "px", "width": "60px", "height": "40px" }, 500, function () { that.remove(); }).fadeTo(0, 0.1).hide(0); }