Hello, I encountered such a problem. I want to highlight the active tabs, but when I add an index, the ticket stops working correctly
Works fine;
$class = 'navigation__sub'; if (basename($_SERVER['PHP_SELF']) == 'tickets.php') $class = 'navigation__sub navigation__sub--active navigation__sub--toggled'; And if you do already
$class = 'navigation__sub'; if (basename($_SERVER['PHP_SELF']) == 'tickets.php' || 'index.php') $class = 'navigation__sub navigation__sub--active navigation__sub--toggled'; then all the tabs start to glow when you switch to any tab, how can I fix it?
The output of the class $ active;
'index.php'will always betrue. Use the conditions correctly. The correct version of your condition was given by the previous commentator. - Pyramidhead