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.