网络编程 
首页 > 网络编程 > 浏览文章

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

(编辑:jimmy 日期: 2025/12/26 浏览:3 次 )
下面是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'});
}
}
);
上一篇:js中document.getElementByid、document.all和document.layers区分介绍
下一篇:5个javascript的数字格式化函数分享
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 网站地图 SiteMap