0👍
You can do this easily with this JS code:
$('.dropdown').on('click', function(){
location.href='www.example.com';
});
0👍
With a quick search of bootstrap navbar hover dropdown
the first result gave the answer you are looking for. PLEASE RESEARCH BEFORE POSTING A QUESTION!
jQuery:
const $dropdown = $(".dropdown");
const $dropdownToggle = $(".dropdown-toggle");
const $dropdownMenu = $(".dropdown-menu");
const showClass = "show";
$(window).on("load resize", function() {
if (this.matchMedia("(min-width: 768px)").matches) {
$dropdown.hover(
function() {
const $this = $(this);
$this.addClass(showClass);
$this.find($dropdownToggle).attr("aria-expanded", "true");
$this.find($dropdownMenu).addClass(showClass);
},
function() {
const $this = $(this);
$this.removeClass(showClass);
$this.find($dropdownToggle).attr("aria-expanded", "false");
$this.find($dropdownMenu).removeClass(showClass);
}
);
} else {
$dropdown.off("mouseenter mouseleave");
}
});
- [Vuejs]-Data does not gets added to database after adding email and password in authorization in firebase through vue.js
- [Vuejs]-Why does my Vue component ignore media queries?
Source:stackexchange.com