jquery css gradually increases the size of div_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:06
Original
1171 people have browsed it

<script type="text/javascript" src="http://www.cnblogs.com/0banana0/admin/&rdquo;http:/ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&rdquo;"></script><script type="text/javascript">// <![CDATA[$(function(){ $("#id").click(function() {    $(this).css({      width: function(index, value) {        alert(value);        return parseFloat(value) * 1.2;      },       height: function(index, value) {          alert(value);        return parseFloat(value) * 1.2;      }    });  });});// ]]></script><div id="id" style="background: Red; width: 50px; heigth: 50px;">sa</div>
Copy after login

Effect Click on the red layer

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template