/    Sign up×
Community /Pin to ProfileBookmark

Dropdown list stay open when adding a link?

I am trying to do an admin layout in only html, css and js. One problem that remains is that the dropdown list collapses as soon as I add a link. Using # as a link the list stay open (desired).

Here is the jsfiddle that behaves as desired as I cannot add any links: http://jsfiddle.net/q2en6djg/1/
And my attempt in a server: http://94.237.25.207:8080 Some of the list items are with links (Examples/about)
The server is using Golang and templates.

How do I get the sublist to stay open when using links?

TIA!

to post a comment
CSSJavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumMar 03.2019 — Do I understand this correctly? The links open another page that contains the same menu?
Copy linkTweet thisAlerts:
@CloudulusMar 03.2019 — I tried your fiddle and your site and the menu stays open when I click anchor links (#). I'm not able to duplicate your problem. Also, your layout looks nice and clean and kudos for using vanilla JS!
Copy linkTweet thisAlerts:
@sibertauthorMar 03.2019 — @Sempervivum#1601380 No. Same meny opens a subwindow in the same layout.
Copy linkTweet thisAlerts:
@sibertauthorMar 03.2019 — @Cloudulus#1601385 That is the problem. Using a fake anchor works. But with real links it does not work. I have now found out that when the sub page appear, the whole page redraw. So my question should be rephrased. How do I reopen the same list and highlight the selected row.
×

Success!

Help @sibert spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...