Answer the question
In order to leave comments, you need to log in
What if the element does not remove the class?
In general, when I hover over an element, a decorative line appears, I did it with ::after
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li>a::after {
display: block;
position: absolute;
width: 100%;
height: 2px;
content: "";
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
opacity: 0;
background-color: #2196F3;
margin-top: 5px;
box-shadow: 0 0 10px #2196F3, 0 0 20em #2196F3;
}
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li>a:hover:after,
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li>a:focus:after {
opacity: 1;
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
cursor: pointer;
}
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li.active>a:after,
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li.active>a:after:after {
opacity: 1;
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
cursor: pointer;
}
.header>.container>.navbar>.navbar-wrapper>.wrapper-center>ul>li.active>a::after {
display: block;
position: absolute;
width: 100%;
height: 2px;
content: "";
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
opacity: 1;
background-color: #2196F3;
margin-top: 5px;
box-shadow: 0 0 10px #2196F3, 0 0 20em #2196F3;
}
.on("click", ".dd-trigger", function(e) {
e.preventDefault();
var that = $(this);
var id = that.attr("data-target");
var dd = $(".dd" + id);
that.closest("li").toggleClass("active");
var h = that.outerHeight();
dd.css({ top: that.position().top + h + "px", right: 0 }).toggleClass(
"show"
);
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question