Help with adding Javascript to PHP code
-
Hi,
I have created a drop down menu through Fireworks and would like to apply it to my header menu. The header menus are made up of my categories so I only want this drop down menu to apply to one category that has children categories.
My files are called mm_css_menu.js and header_menu.css
The PHP code that is for the header menu is as follows:
<div id="header-menu"> <ul> <?php if (is_home()) { ?> <li class="current_page_item"><a href="<?php echo get_option('home'); ?>/">Home</a></li> <?php } else { ?> <li><a href="<?php echo get_option('home'); ?>/">Home</a></li> <?php } ?> <?php wp_list_categories('sort_column=name&title_li=&depth=3'); ?> </ul> </div>I just need to be pointed out what I need to add to display children categories and where to add the javascript code.
Am I correct in thinking this is the Javascript code I need to add in:
<script type="text/javascript" src="mm_css_menu.js"></script> <link rel="stylesheet" href="header_menu.css" type="text/css" />The menu item is Products that needs the drop down menu if you need to see my site it’s http://abcbabyland.com/blog/
Thanks for all your help.
Wendy
The topic ‘Help with adding Javascript to PHP code’ is closed to new replies.