Home >Web Front-end >JS Tutorial >jQuery realizes the function of enlarging the picture when the mouse passes over it

jQuery realizes the function of enlarging the picture when the mouse passes over it

php中世界最好的语言
php中世界最好的语言Original
2018-04-24 10:53:172886browse

This time I will bring you jQuery to implement the function of enlarging the picture when the mouse passes over. What are the precautions for jQuery to implement the function of enlarging the picture when the mouse passes over. The following is a practical case, let's take a look.

Let’s take a look at a demonstration picture first

The following is a code example:

<link>
<script></script>
<script></script>
<script>
$(function(){
	$("a.preview").preview();	 
});
</script>
<style>
html{overflow-y:scroll;}
a.preview,a.preview:hover{text-decoration:none;}
a.preview img{margin:20px 10px;}
</style>


<p>
 </p><p>
  </p><h3>图片放大显示的jQuery插件演示页面</h3>
  <p>
			</p><p>
   	<a>
    	<img  src="/static/imghwm/default1.png" data-src="http://image.jb51.net/image/study/s/s128/mm1.jpg" class="lazy" alt="jQuery realizes the function of enlarging the picture when the mouse passes over it" >
    </a>
    <a>
    	<img  src="/static/imghwm/default1.png" data-src="http://image.jb51.net/image/study/s/s128/mm2.jpg" class="lazy" alt="jQuery realizes the function of enlarging the picture when the mouse passes over it" >
    </a>
    <a>
    	<img  src="/static/imghwm/default1.png" data-src="http://image.jb51.net/image/study/s/s128/mm3.jpg" class="lazy" alt="jQuery realizes the function of enlarging the picture when the mouse passes over it" >
    </a>
    <a>
    	<img  src="/static/imghwm/default1.png" data-src="http://image.jb51.net/image/study/s/s128/mm4.jpg" class="lazy" alt="jQuery realizes the function of enlarging the picture when the mouse passes over it" >
    </a>
    <a>
    	<img  src="/static/imghwm/default1.png" data-src="http://image.jb51.net/image/study/s/s128/mm5.jpg" class="lazy" alt="jQuery realizes the function of enlarging the picture when the mouse passes over it" >
    </a>
   </p>   
  
 


The above is the detailed content of jQuery realizes the function of enlarging the picture when the mouse passes over it. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn