-
-
Save lixingcong/7216a415e91b996e7bebc006f0dff5cb to your computer and use it in GitHub Desktop.
html续秒js脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _click_count=0; | |
$("body").bind("click",function(e){ | |
//var n=Math.round(Math.random()*100);//随机数 | |
var $i=$("<b>").text("+"+(++_click_count)); | |
var x=e.pageX,y=e.pageY; | |
$i.css({ | |
"z-index":99999, | |
"top":y-15, | |
"left":x, | |
"position":"absolute", | |
"color":"red" | |
}); | |
$("body").append($i); | |
$i.animate( | |
{"top":y-180,"opacity":0}, | |
1500, | |
function(){$i.remove();} | |
); | |
e.stopPropagation(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment