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