Topic: nav item active current page
teawebsite
pro
asked 5 years ago
Hi there, I'm trying to set up nav item link as active for the current page. I used a little script like this
<script>
$(".nav a").on("click", function(){
$(".nav").find(".active").removeClass("active");
$(this).parent().addClass("active");
});
</script>
but no lucky. Can you help me?
Add comment
Mirosław Stasiak
free
answered 5 years ago
Hi,
could you send me files with your code with this issue here or on m.stasiak@mdbootstrap.com ? Then I will help you.
regards,
Mirek
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags