您的位置:首页 > Web前端 > JQuery

基于jquery的代码显示区域自动拉长效果

2011-12-07 00:00 519 查看
下面是jquery的实现代码:
$(document).ready(function(){ 

$('pre').hover( 
function(){ 
if($(this).width()==520){ 
$(this).animate({width:'800'},400); 
$(this).css({border:'1px solid #2B99E6'}); 
} 
}, 
function(){ 
if($(this).width()==800){ 
$(this).animate({width:'520'},400); 
$(this).css({border:'1px solid #555555'}); 
} 
} 
);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: