How to do DOM manipulation on a header file included using w3-include-html?

Viewed 53

I have a header and footer file which is included in multiple pages using w3-include-html. How can I manipulate the navbar like if a user is logged in, I want to change the login into logout?

<span w3-include-html="header.html"></span>
1 Answers

You need to check/get data from Local Storage or Session Storage, if registered user is logged in you can change login to logout.

Related