The code is very simple, so I won’t go into too much nonsense here, just give it to you:
$(function(){
var w=0,tip=$("");
Tip.css({
"z-index":99999,position:"absolute",color:"red",display:"none"
}),
$("body").append(tip),//The page creates a b tag to display the number
$(document).on("click",function(e){
var x=e.pageX,y=e.pageY;//Get the clicked page coordinates
tip.text(" " w).css({//Number plus 1
display: "block", top: y-15, left: x, opacity: 1 // Positioning display
}).stop(!0,!1).animate({//stop(stopAll,goToEnd), if multiple clicks occur, stop the execution of the previous animation
Top:y-180,opacity:0},800,function(){
Tip.hide()
e.stopPropagation()
});
});
That’s it for the code, I hope you guys like it.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn