This article illustrates the method of jquery to realize the function of mouse moving enlarge picture. Share to everyone for your reference. The specific analysis is as follows:
Do graduation design, the teacher after watching the demo, I do not want to buy the goods in the cart pictures too large, not beautiful, so that beautify an effect. Search the Internet to check the code, modified a simple version of.
Using jquery, and not using JavaScript to get the mouse state, this is mainly and JavaScript need to write in the label itself is called to the action, too cumbersome, a moment to confuse themselves, using jquery technology directly based on the label of the Id,class and so on, can identify trigger conditions, direct response (Baidu Encyclopedia that this is a great advantage of jquery, no longer insert a bunch of JS in HTML to invoke the command, only need to define the ID can be).
The purpose of this technique is to realize that when you view the goods in a shopping cart, you only need to display small images and display large images when the mouse is sliding. Mainly in order to improve the user experience, otherwise in the shopping cart big picture display commodity information will directly affect the entire Web page aesthetic.
That's how it's done.
Source:
I hope this article will help you with your jquery programming.