To set cms page link in top navigation and set them active when clik on them.below is code for the same.


For set link

<ul id="nav">
 <?php echo $_menu ?>
 <li id="cms_page" onclick="addClass(this.id);"><a class="fancyboxclass1"
href="<?php  echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'testpop';?>">select</a></li>
 </ul>
for set link active when click on them
function addClass(id){
$$('li.active').invoke('removeClassName','active');
node = $(id);
node.addClassName("active");
} 
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s