Home  >  Article  >  Web Front-end  >  jquery css gradually increases the size of div_html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 12:28:061172browse

<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>

Effect Click on the red layer

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