We often use it to find people nearby. They all use the mobile phone shake function on the app. Now, we have moved this technology to the mobile web for everyone to learn. If you need it, you can refer to it. Mobile phone Shake can be applied to many scenarios, such as shake, shake, and search. This article will show you how to use HTML5 + PHP + jQuery to shake your cell phone.
Note: This is an article on comprehensive application of WEB knowledge. read this article on the premise that you need to have basic knowledge in HTML5, jQuery, PHP, MySQL, and other related fields.
HTML
By default, the product information (image and text description of a certain brand dress) is displayed on the my page. Of course, the product information can be obtained from the database in practical applications.
Shake your phone
Gray
Then load the jQuery library file on the page. At the same time, we continue to use the code used to listen on mobile phone shake in the previous article "tutorial on mobile phone shake with HTML5": shake. js.