基于jquery的代码显示区域自动拉长效果_jquery
来源:懂视网
责编:小采
时间:2020-11-27 21:01:41
基于jquery的代码显示区域自动拉长效果_jquery
基于jquery的代码显示区域自动拉长效果_jquery:下面是jquery的实现代码: 代码如下: $(document).ready(function(){ $('pre').hover( function(){ if($(this).width()==520){ $(this).animate({width:'800'},400); $(this).css({border:'1px solid
导读基于jquery的代码显示区域自动拉长效果_jquery:下面是jquery的实现代码: 代码如下: $(document).ready(function(){ $('pre').hover( function(){ if($(this).width()==520){ $(this).animate({width:'800'},400); $(this).css({border:'1px solid

下面是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'});
}
}
);
基于jquery的代码显示区域自动拉长效果_jquery
基于jquery的代码显示区域自动拉长效果_jquery:下面是jquery的实现代码: 代码如下: $(document).ready(function(){ $('pre').hover( function(){ if($(this).width()==520){ $(this).animate({width:'800'},400); $(this).css({border:'1px solid