Dreamweaver gives an error. What’s the right syntax?
After the first
.animate({left: ‘-=980’}, 550,
?
The real deal is: That I can only use one “.animate({left: ‘-=980’}, 550,” in this code… There comes an error if I want to add two (or more) .animate’s in the animation queue.
BTW: The “clicknr” variable and the ‘disabled’ CSS class – are just flags for some internal process.
$('#fwdShowroom').click(function() {
$button = $(this);
if ( clicknr != 1 ) {
if( !$button.hasClass( 'disabled' ) ) {
$button.addClass( 'disabled' );
clicknr -= 1,
$('#showroom ul')
.animate({left: '-=985'}, 550,
Dreamweaver says: Error on this line .animate({left: '+=5'},200,
function() { $button.removeClass('disabled') });
}
}
});
The needed effect is: That the “#showroom ul” DIV smoothly moves forward and then goes smoothly some pixels back to create a nice physical motion.
You forgot the closing parentheses
)in the firstanimatecall: