随意隐藏div的jquery代码,如下:
<!DOCTYPE html> <html> <head> <style> div { background:#ece023; width:30px; height:40px; margin:2px; float:left; } </style> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <div>a</div> <div>b</div> <div>c</div> <div>d</div> <div>e</div> <div>f</div> <script> $("div").click(function () { $(this).hide(1000); }); </script> </body> </html>