Add and remove a class on click using jQuery?
you can try this along, it may help to give a shorter code on large function.
$('#menu li a').on('click', function(){
$('li a.current').toggleClass('current');
});
Why not try something like this?
$('#menu li a').on('click', function(){
$('#menu li a.current').removeClass('current');
$(this).addClass('current');
});
JSFiddle
The other li elements are not siblings of the a element.
$('#menu li a').on('click', function(){
$(this).addClass('current').parent().siblings().children().removeClass('current');
});