Помогите пожалуйста сделать так:
Нажимаешь на ссылку расположенную в аккордион меню, страница загружается и данная ссылка была подсвечена например красным.
Как это реализовать в данном меню? Если что то вот сайт
djwolf.renzacci.pro/ на котором установлено это меню
вот css и главный php
Предупреждение: Помехи!| Код: |
#s5_accordion_menu {
margin-top:-10px;
margin-bottom:0px;
margin-right:0px;
margin-left:0px;
width:258px;
}
#s5_accordion_menu h3.s5_am_toggler {
height:60px;
line-height:31px;
margin:0;
}
.s5_am_toggler:hover{
background-color: rgba(57, 138, 164, 0.7);
border-radius:4px;
-webkit-border-radius:4px;
-moz-border-radius:5px;
-khtml-border-radius:10px;
}
div.s5_accordion_menu_element li {
background-color: rgba(57, 138, 164, 0.7);
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
div.s5_accordion_menu_element li a:hover{
background-color: rgba(57, 138, 164, 1);
}
div.s5_accordion_menu_element li a {
border-bottom: 1px solid #286275;
color: #ffffff;
cursor: pointer;
display: block;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 14px;
line-height: 18px;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 6px;
padding-left: 3px;
padding-top: 6px;
}
* html div.s5_accordion_menu_element li a {
width:75%;
}
ul.s5_am_innermenu {
margin-bottom:0;
padding-left:0;
margin-left:0;
margin-top:0;
}
|
Предупреждение: Помехи!| Код: |
<?php
/**
* @version $Id: default.php 19594 2010-11-20 05:06:08Z ian $
* @package Joomla.Site
* @subpackage mod_menu
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
// Note. It is important to remove spaces between elements.
//echo '<pre>';
//print_r($list);exit;
$mod_s5_accordionurl = JURI::root().'modules/mod_s5_accordion_menu/';
$doc =& JFactory::getDocument();
$doc->addCustomTag('<link href="'. $mod_s5_accordionurl .'css/s5_accordion_menu.css" rel="stylesheet" type="text/css" media="screen" />');
?>
<div id="s5_accordion_menu">
<div>
<?php
$x = 0;
foreach ($list as $i => &$item) :
$class = '';
if ($item->id == $active_id) {
$class .= 'current';
}
else {
$class .= 'not_current';
}
if($x==1 && $item->level==1){
$x = 0;
}
if($item->level==1){
if ($class == "current") {
echo "<h3 id='$class' class='s5_am_toggler'>";
}
else {
echo "<h3 class='s5_am_toggler'>";
}
}
if ($item->level!=1) {
if ($class == "current") {
echo "<li id='$class' class='s5_am_inner_li active'>";
}
else {
echo "<li class='s5_am_inner_li'>";
}
}
// Render the menu item.
switch ($item->type) :
case 'separator':
case 'url':
case 'component':
require JModuleHelper::getLayoutPath('mod_s5_accordion_menu', 'default_'.$item->type);
break;
default:
require JModuleHelper::getLayoutPath('mod_s5_accordion_menu', 'default_url');
break;
endswitch;
if($item->level==1 && $item->deeper==0){
echo "</h3><div class='s5_accordion_menu_element' style='display: none; border:none; overflow: hidden; padding: 0px; margin: 0px'></div>";
continue;
}
if($item->level==1 && $item->deeper==1){
echo "</h3><div class='s5_accordion_menu_element' style='display: none; border:none; overflow: hidden; padding: 0px; margin: 0px'>";
}
//if ($item->level!=1) {
// The next item is deeper.
if ($item->deeper) {
echo '<ul class="s5_am_innermenu">';
}
// The next item is shallower.
else if ($item->shallower) {
//if(!($list[$i+1]->level==1 && $item->deeper==0))
echo '</li>';
if((@$list[$i+1]) && !(@$list[$i+1]->level==1 && $item->deeper==0))
echo str_repeat('</ul></li>', $item->level_diff);
else
echo str_repeat('</ul>', $item->level_diff);
}
// The next item is on the same level.
else {
// if(!($list[$i+1]->level==1 && $item->deeper==0))
echo '</li>';
}
if((@$list[$i+1]->level==1 && $item->deeper==0 ) || !(@$list[$i+1])){
echo "</div>";
}
//}
$x++;
endforeach;
?>
</div>
</div>
|