Sunday, 18 August 2013

jquery toggle not working dropdown

jquery toggle not working dropdown

i used jquery toggle in dropdown widget but toggle not working with click.
code is:
var DropHeight = jQuery('.extrabox').outerHeight();
var Dt = jQuery('.extrabox');
jQuery('.extrabox').css("top","-"+DropHeight+"px");
jQuery('.icon-bookmark').toggle(function(e) {
$Dt.animate({'top': 0}, {duration: '800', easing: 'easeInOutExpo'});
}, function() {
$Dt.animate({'top': -DropHeight}, {duration: '800', easing:
'easeInOutExpo'});
});
Demo: http://jsfiddle.net/K4bR7/2/

No comments:

Post a Comment