I always get so confused with open/close buttons.
This is probably the wrong way about going about it – but I cant seem to get the second alternations to run.
Is there something else I should be using? Thanks
$(currentSlideHtmlObject).find('.openSpec').on('click',
function (e){
e.preventDefault();
$techSpec.animate({
left : '-' + $techSpec.outerWidth() + 'px'
});
},
function (e) {
e.preventDefault();
$techSpec.animate({
left : '0px'
});
}
);
You’re looking for
toggle, noton:Live Example | Source