0

<a> tag onclick is not working properly in my admin dashboard?

i have written many <a> tag with 'onlclick' attribute and it's opening different pages. but whenever i click on it. it's not working properly. click working sometimes on right side or sometimes left side of the text . Let's understand with this an example : my a tag with onlclick attribute: <a onclick="$.sidebar.showCard(event, 8, false)" showcard="my_students" class= "w3-bar-item w3-button"> <i class="fas fa-user-graduate"></i> <span>My Students</span> </a> whenever a user click on above link it's shows mystudents page. and when it's not working then this highlights the last link of sidebar, which is logout..

17th Feb 2021, 6:44 AM
Chandan Kumar
Chandan Kumar - avatar
2 Réponses
+ 1
use href instead of onclick
19th Feb 2021, 11:19 AM
Omar Gufran
Omar Gufran - avatar
0
Omar Gufran but I want to open my page with onlclick not by href... Please understand my question and write clear answer so it can help me...
28th Feb 2021, 4:55 AM
Chandan Kumar
Chandan Kumar - avatar