You could use:
$(document).ready(function () {
$("#mobile_bar").click(function () {
var $navBox = $("#navigation_box").clearQueue();
if (!$(this).data('toggle')) {
$navBox.fadeIn(500);
} else {
$navBox.transition({
scale: 0,
delay: 500
});
}
$(this).data('toggle', !$(this).data('toggle'));
});
});
PS: not sure transition
plugin uses the fx
queue or not?!