help with toggle animation
I am having trouble giving my toggle function an animation, I just want it animate when it opens/close
- $(document).ready(function() {
- var adjustheight = 80;
- $(".view-gallery-trigger").toggle(function() {
- $('#view-gallery').css('height', 'auto').css('overflow', 'visible');
- $(this).addClass('opened');
- $(this).removeClass('closed');
- }, function() {
- $('#view-gallery').css('height', adjustheight).css('overflow', 'hidden');
- $(this).addClass('closed');
- $(this).removeClass('opened');
- });
- });
but when i have it read "toggle("slow",function()" the script doesn't work