Changing joomla top menu class name

I am trying to create a joomla 2.5 template. I use the following code in my index.php to display the top menu items.

 <?php if ($this->countModules('topmenu')): ?>    
  <hr>
  <div class="container">
     <jdoc:include type="modules" name="topmenu"/>
  </div>
<?php endif; ?>

The above code generates the following html

<ul class="menunav">
   <li class="item-464 active"><a href="/joomla2/" >Home</a></li>
   <li class="item-444"><a href="/joomla2/index.php/sample-sites" >Sample Sites</a>
   </li><li class="item-207"><a href="http://joomla.org" >Joomla.org</a></li>
</ul>

The problem is that the class name that I used to design the top menu items nav, and the menu should work fine if I have html like the following

  <ul class="nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#">Sample Sites</a></li>
      <li><a href="#">Joomla ORG</a></li>
  </ul>

I heard about the class suffix , but I try not to do this from the admin panel. Since every time a new user uses my template, you will have to add the class suffix from the admin panel.

I tried the following code, but it does not change anything:

<script type="text/javascript">
    $(document).ready(function() {
       $('.menunav').removeClass('menunav').addClass('nav');
    });
</script>

Could you tell me how to change the top menu class name in joomla 2.5

+5
1

, , .

. . html mod_menu. default.php modules\mod_menu\tmpl.

<ul class="menu<?php echo $class_sfx;?>"

<ul class="nav".

Joomla . , Joomla .

-:

module chrome. html modules.php.

​​

defined('_JEXEC') or die;

function modChrome_nosfx($module, &$params, &$attribs)
{
    if (!empty ($module->content)) : ?>
        <div class="moduletable">
        <?php if ($module->showtitle != 0) : ?>
            <h3><?php echo $module->title; ?></h3>
        <?php endif; ?>
            <?php echo $module->content; ?>
        </div>
    <?php endif;
}

.

:

 <?php if ($this->countModules('topmenu')): ?>    
  <hr>
  <div class="container">
     <jdoc:include type="modules" name="topmenu" style="nosfx" />
  </div>
<?php endif; ?>

style="nosfx" . xhtml, templates/system/html modules.php

+3

All Articles