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


下面是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'});
}
}
);

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3