我正在研究一个 jQuery 'Superfish' 下拉菜单(Wordpress)。我使用最新版本的 superfish 和 wordpress。问题是,超级鱼让我的菜单不可见……我什么都看不到我的菜单……
函数.php
//Register Superfish
///////////////////////////////////////////////////////////
add_action( 'wp_enqueue_scripts', 'superfish_libs' );
function superfish_libs()
{
// Register each script, setting appropriate dependencies
wp_register_script('hoverintent', get_template_directory_uri() . '/superfish-js/hoverIntent.js');
wp_register_script('bgiframe', get_template_directory_uri() . '/superfish-js/jquery.bgiframe.min.js');
wp_register_script('superfish', get_template_directory_uri() . '/superfish-js/superfish.js', array( 'jquery', 'hoverintent', 'bgiframe' ));
wp_register_script('supersubs', get_template_directory_uri() . '/superfish-js/supersubs.js', array( 'superfish' ));
// Enqueue supersubs, we don't need to enqueue any others in this case, as the dependencies take care of it for us
wp_enqueue_script('supersubs');
// Register each style, setting appropriate dependencies
wp_register_style('superfishbase', get_template_directory_uri() . '/superfish-css/superfish.css');
wp_register_style('superfishvert', get_template_directory_uri() . '/superfish-css/superfish-vertical.css', array( 'superfishbase' ));
wp_register_style('superfishnavbar', get_template_directory_uri() . '/superfish-css/superfish-navbar.css', array( 'superfishvert' ));
// Enqueue superfishnavbar, we don't need to enqueue any others in this case either, as the dependencies take care of it
wp_enqueue_style('superfishnavbar');
}
//Register jQuery 1.1.3
///////////////////////////////////////////////////////////
wp_deregister_script('jquery');
if(!is_admin()) {
wp_register_script('jquery', get_template_directory_uri() . '/js/jquery-1.1.3.js');
wp_enqueue_script('jquery');
}
头文件.php
<div id="wrapper-mainnav">
<div class="left"></div>
<div class="content">
<?php wp_nav_menu(array('theme_location' => 'mainnav', 'menu_class' => 'sf-menu')); ?>
</div>
<div class="right"></div>
<br class="clearer">
<div class="bottom"></div>
</div><!--wrapper-mainnav-->
请帮忙,我找不到故障...请告诉我,如果您需要更多信息...