


jQuery realizes the random number display animation effect of likes (with online demonstration and demo source code download)_jquery
The example in this article describes the animation effect of random number display of likes implemented by jQuery. Share it with everyone for your reference, the details are as follows:
The screenshot of the running effect is as follows:
Click here to view Online Demo.
Click here for complete example codeDownload from this site.
The specific code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>jQuery实现点赞数字累加动画效果</title> <style type="text/css"> *{margin:0;padding:0;list-style-type:none;} a,img{border:0;} html,body{background:#fff;font-size:14px;font-family:"microsoft yahei";} .tip{text-align:center;padding-top:10%;font-size:2em;} </style> <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> <script type="text/javascript"> $("html,body").on("click",function(e){ anp(e); }) function anp(e){ var n=Math.round(Math.random()*10); var $i=$("<b>").text("+"+n); var x=e.pageX,y=e.pageY; $i.css({top:y-20,left:x,position:"absolute",color:"#E94F06"}); $("body").append($i); $i.animate({top:y-180,opacity:0,"font-size":"1.4em"},1500,function(){ $i.remove(); }); e.stopPropagation(); } </script> </head> <body> <div class="tip">点击页面任意位置查看效果</div> </body> </html>
I hope this article will be helpful to everyone in jQuery programming.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In WeChat video accounts, likes and love are common ways for users to interact. Likes indicate the user's recognition and support for the video content they like, while hearts show the user's love and concern for the video creator. Although likes and hearts both express the user's recognition and love for the video content, there are some subtle differences in substance. 1. What is the difference between likes and love on a WeChat video account? Likes are often a way of expressing general approval and support, with users simply clicking the "Like" button under a video to express their approval of the video. This simple and direct format allows users to express their opinions quickly, while also helping the video spread more widely. Love is personal and emotional. In the WeChat video account, users can click the "

We often use ppt in our daily work, so are you familiar with every operating function in ppt? For example: How to set animation effects in ppt, how to set switching effects, and what is the effect duration of each animation? Can each slide play automatically, enter and then exit the ppt animation, etc. In this issue, I will first share with you the specific steps of entering and then exiting the ppt animation. It is below. Friends, come and take a look. Look! 1. First, we open ppt on the computer, click outside the text box to select the text box (as shown in the red circle in the figure below). 2. Then, click [Animation] in the menu bar and select the [Erase] effect (as shown in the red circle in the figure). 3. Next, click [

In today's era of information explosion, social media has become an indispensable part of people's daily lives. As the leading lifestyle sharing platform in China, Xiaohongshu has attracted a large number of users to share and obtain information here. So, how do we view like comments on the Xiaohongshu platform? This article will answer this question in detail. 1. Where can I read the comments liked by Xiaohongshu? First, we need to log in to our account on the Xiaohongshu platform. After logging in, we can see the content recommended on the homepage and the updates posted by people we follow. Below each post, we can see buttons for like and comment. Click the Like button to express your approval of this content. Click the comment button to view other users' comments on the content. 3.If

In the digital age, Xiaohongshu has become an important platform for people to share their lives and exchange experiences. Users interact through likes and comments, forming a tight social network. This article will explore how to view comments that have been liked by others on Xiaohongshu, and what types of content are more likely to get likes and comments. 1. What do you think about other people’s comments that Xiaohongshu has liked? Users can interact by viewing liked comments to express support and liking. The specific viewing method is as follows: 1. On the Xiaohongshu homepage, click the "Discover" button to enter the "Discover" page. 2. On the "Discover" page, click the "Circle" button to enter the "Circle" page. 3. On the "Circles" page, browse the topics or circles you are interested in and find comments you like. 4. Click on the comment to see the likes

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

How to remove the height attribute of an element with jQuery? In front-end development, we often encounter the need to manipulate the height attributes of elements. Sometimes, we may need to dynamically change the height of an element, and sometimes we need to remove the height attribute of an element. This article will introduce how to use jQuery to remove the height attribute of an element and provide specific code examples. Before using jQuery to operate the height attribute, we first need to understand the height attribute in CSS. The height attribute is used to set the height of an element

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: <

Sometimes we encounter the need to add animation to a ppt. For example, if we want to make a thunderstorm ppt and add some animated thunderstorm effects to it, what should we do? Today, the editor will introduce to you how to make an animated thunderstorm in thunderstorm ppt. It is actually very simple, come and learn it! 1. First we open a PPT page, "Insert" - "Shape" - "Basic Shape" - "Lightning Shape", as shown in the picture. 2. In the "Fill and Line" tab on the right, select "Fill": white; "Select" "Line": black, as shown in the figure. 3. Click "Animation" - "Custom Animation" - "Add Effects" - "Emphasis" - "Subtle" - "Flickering",
