Bootstrap: How to make dropdown navigation Parent links an active link?

please add below js, hope it will work

jQuery(function($) {
$(‘.navbar .dropdown’).hover(function() {
$(this).find(‘.dropdown-menu’).first().stop(true, true).delay(250).slideDown();

}, function() {
$(this).find(‘.dropdown-menu’).first().stop(true, true).delay(100).slideUp();

});

$(‘.navbar .dropdown > a’).click(function(){
location.href = this.href;
});

});