can you pass a function to animate()?
hi,
can you pass a function to animate()?
can you animate this?
- $('a#test').addClass('selected');
or can you only animate CSS settings (I can't imagine animate() to be so limited...;-)
this doesn't work....
- $('a#nav').click( function(e) {
- e.preventDefault();
- $('#test').animate(function() {
- $('#test').addClass('selected'); }, 600);
- });
neither does this....
- $('a#nav').click( function(e) {
- e.preventDefault();
- $('#test').animate(function() {
- $(this).addClass('selected'); }, 600);
- // ^^^^^^
- });
thank you.....