Папробуй так:
$(function(){var w=0;
$('#div_for_img img').each(function(){
$(this).click(function(){
var a=$(this).attr('width');
var b=parseInt(a);
b=a/2;
if (w==1){
$(this).attr('width', a*2);
$(this).attr('height', a*2);
w=0;
}else{
$(this).attr('width', b);
$(this).attr('height', b);
w=1;
};
})});
})
;
|