Monday, March 16, 2009

Chain Effects on single set of element

Chain effects in the single element is inline effect but not including .css():
Here is the example:
$('div.label').click(function(){
$('div.button').fadeTo('slow',0.5)
.animate({left: 650},'slow')
.fadeTo('slow',1.0)
.slideUp('slow')
.css('backgroundColor','#f00');

});
You will see the backgroundColor of button will immediately affected after click on div.label

No comments: