Think of it logically.....
To animate a property, the computer needs to work out the in-between
stages (tweening) to show:
e.g animate width from 10 to 20 = 11,12,13,14, etc
to animate opacity from 40% to 100% = 41%, 42%, 43%, etc
You can also animate colours*, because behind-the-scenes they go from
#000000 to #FFFFFF = 00, 01, 02..09, 0A, 0B..0F, 10, 11, etc
What would you reckon the "tweens" from "inline" to "block" were ?
L
ldexterldesign wrote:
Hey Ricardo,
I thought this might be the case. Nothing to clarify on the jQuery
website that I could find. Thanks for the tip - I'll bear that in mind
for the future.
Cheers,
L
On May 14, 11:25 pm, Ricardo <ricardob...@gmail.com> wrote:
dude, you can't animate from inline to block. For any width/height
animation to work correctly the element needs display:block from the
start.
On May 14, 10:08 am, ldexterldesign <m...@ldexterldesign.co.uk> wrote:
Hey guys,
Got a little script I've written. Would like to animate the appearance
of the #sidebar2 to it's new block element state if possible ($
('#sidebar2').css('display', 'block');).
// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');
> $('#sidebar2').css('display', 'block');
$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});
What I've been experimenting with isn't working unfortunately :[
// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');
> $('#sidebar2').animate({display: "block"}, 1000);
$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});
Any tips?
Cheers dudes,
L
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.329 / Virus Database: 270.12.31/2116 - Release Date: 05/15/09 06:16:00