Topic: How to link to a pill?
PerfectCamp priority asked 1 year ago
In the MDB Design blocks there is a Login / Register example. On the Login content there is a Register text link toward the bottom. Clicking on this text link doesn't do anything. I'm trying to hook it up to show the Register pill content.
Is there a quick way to have this link open the Register pill?
Resources (screenshots, code snippets etc.)
Kamila Pieńkowska staff answered 1 year ago
Add ID
to register link and add this JS code:
const tab = document.querySelector('#tab-register')
const instance = mdb.Tab.getInstance(tab)
const link = document.querySelector('#register-link')
link.addEventListener('click', ()=> instance.show())
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 6.4.0
- Device: PC
- Browser: Chrome
- OS: Win 11
- Provided sample code: No
- Provided link: Yes