<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>SlideToggle()title> <script type="text/javascript" src="../jquery-2.1.4.js"> script> <style type="text/css"> .divFrame{ border:solid 1px #666; background-color:#eee; padding:5px; width:260px;} .divFrame img{ border:solid #eee; padding:2px;} style> <script type="text/javascript"> $(function(){ $(".divFrame").click(function(){ $("img").slideToggle(3000,function(){ $("img").css("border","solid 1px #ccc"); }) }) }) script> head> <div class="divFrame"> <img src="Images/1.png" alt=" " title="风景图" /> div> <body> body> html>
[JQ权威指南]SlideToggle()方法的动画效果自动切换图片高度
关注
打赏