I am trying to create a joomla 2.5 template. I am using 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 the class name that I have used for designing the top menu items is nav
and the menu should work perfectly if I have the html like 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 have heard about class suffix, but I am trying not to get it done from the the admin panel. Because every time a new user uses my template will have to add the class suffix from the admin panel.
I have tried the following code, but it is not changing anything:
<script type="text/javascript">
$(document).ready(function() {
$('.menunav').removeClass('menunav').addClass('nav');
});
</script>
Could you please tell me how to change the top menu class name in joomla 2.5