Greetings to all, tell me where there may be an error, the class does not change to an asset when you press the buttons, it turns out that the "review" button is always highlighted. What could be the error
<div id="menu"> <ul id="menuHead"> <li> <a href="/news" target="_top" class="newmessage">Новости</a> </li> <li class="active"> <a href="/profile" target="_top">Обзор</a> </li> <? $usid=$ _SESSION[ "user_id"]; $db->Query("SELECT * FROM ".$pref."_pm WHERE user_id_in = '$usid' AND status = 0 AND inbox = 1"); $sk = $db->NumRows(); if ($sk > 0) { $pmm = '<font color="red">('.$sk.')</font>'; } else { $pmm = '<font color="red">(0)</font>'; } ?> <li> <a href="/msg" target="_top" id="msgmenu">Сообщения <?=$pmm; ?></a> </li> <li> <a href="/hideout" target="_top">Пещера</a> </li> <li> <a href="/city" target="_top">Город</a> </li> <li> <a href="/robbery" target="_top">Охота</a> </li> <li> <a href="/stats" target="_top">ТОП-лист</a> </li> <li class="free-space "> <a href="/contats" target="_blank">Поддержка</a> </li> <li> <a href="/logout" target="_top">Выйти из игры</a> </li> <li id="doc_time"> <script type="text/javascript"> clock(); </script> </li> <script type="text/javascript"> var currentPage = $('#menuHead .active').text(); $('#header h1').text(currentPage); $(document).ready(function() { $('#menuHead li').live('click', function() { $('#menuHead .active').removeClass('active'); $(this).addClass('active'); }); }); </script> </ul> </div>
aand since all pages have the same menu, and active is set only once in the markup, then after the redirect , the "review" button is always highlighted - Grundy