This article mainly introduces how to display large images in the pop-up layer of the jQuery dot thumbnail. The idea is very good. We recommend it to you here. There is no time to learn ASP during the busy march. net mvc program. It is the Chinese New Year in July. It lasts for half a month and is expected to return to my hometown, you can spend more time with elderly parents.
Today, I learned about jQuery and applied it to images. Users can click images to enlarge and display images.
Create a controller FebY15Controller:
Next, create a View Index:
Mark 1 to add an image style:
Mark 2, add the htm code, display the original image, and enlarge the position p tag of the image:
Mark 3 to reference the jQuery class library.
Mark 4 and write the jQuery program:
The following is a dynamic demonstration:
In this article, you can learn about the click event of jQuery. Use the label. Style Class to obtain the object (img. thumb ). Use $ (this) to code the object itself .. Attr ("scr") is used to obtain the src image path. There is also a. animate () dynamic event.