I'm using jquery-2.0.2.min.js and jquery.transit.min.js in my page. I have a div with the id="expand", and it toggles in rotating when you click it. My problem is when after the 2nd toggle, it won't rotate. It just rotates on the 1st click.
flag_expand has an initial value of 0.
$('#expand').click(function() {
if (flag_expand == 0) {
$('footer').transition({
height: 140
}, 1000, function() {} );
$('#expand').transition({
rotate: '180deg'
}, 1000, function() {} );
flag_expand = 1;
}
else if (flag_expand == 1) {
$('footer').transition({
height: 60
}, 1000, function() {} );
$('#expand').transition({
rotate: '180deg'
}, 1000, function() {} );
flag_expand = 0;
}
});