How do I set up Superfish for Wordpress?
I'm trying to create my first theme and I'm new to both PHP and jQuery. I have been trying to get Superfish working on Wordpress for too long now. Can someone help?
I have placed a directory called "js" in my theme's folder. jQuery 1.4 is in there with the Superfish, HoverIntent, and CSS files. This is the code...
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head profile="http://gmpg.org/xfn/11">
- <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
- <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
- <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->
- <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
- <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
- <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
- <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
- <?php wp_get_archives('type=monthly&format=link'); ?>
- <?php //comments_popup_script(); // off by default ?>
- <?php wp_enqueue_script("jquery"); ?>
- <?php wp_head(); ?>
- <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo("stylesheet_url"); ?>/js/superfish.css" />
- <script type="text/javascript" src="<?php bloginfo("stylesheet_url"); ?>/js/jquery-1.4.min.js"></script>
- <script type="text/javascript" src="<?php bloginfo("stylesheet_url"); ?>/js/hoverIntent.js"></script>
- <script type="text/javascript" src="<?php bloginfo("stylesheet_url"); ?>/js/superfish.js"></script>
-
- <script type="text/javascript">
-
- $(document).ready(function(){
- $("ul.sf-menu").superfish();
- });
-
- </script>
- </head>
- <body>
- <div id="wrapper">
- <div id="header">
-
- <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
-
- <div id="menu">
-
- <ul class="sf-menu">
- <?php wp_list_pages('title_li=&'); ?>
- </ul>
-
- </div>
-
- </div>
The only thing that shows up is a list of the Pages without any CSS or fancy menu happening. If anyone can help me I would really appreciate it. I'm pulling my hair out at this point.