The following is the implementation code of 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'});
}
}
);