Skip to content

How to dismiss the navbar menu on link click and off click? #2492

Answered by saadeghi
tansanDOTeth asked this question in Q&A
Discussion options

You must be logged in to vote

It is explained in dropdown page: https://daisyui.com/components/dropdown/

Method 1: using details and summary tags
Stays open until gets clicked again. Or you can close it using JS by removing the open attribute

Method 2: Using CSS focus
Closes when focus is lost

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@saadeghi
Comment options

Answer selected by saadeghi
@tbias25
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants