main_menu_item on click function main_menu_item removeClass active var

1
2
3
4
5
6
7
$('.main_menu_item').on('click',function(){
$('.main_menu_item').removeClass('active');
var el = $(this);
el.addClass('active');
setTimeout(function(){document.location.href = el.attr('href')},100);
return false
});