173 posts
  • Author Level 6
  • Collector Level 2
  • 4 Years of Membership
  • Exclusive Author
Decneo
says

it works fine on my HTML version but not for wordpress Version.

here is in html :

Please click image below for big pic

IN WP :

Header.php

<?php wp_nav_menu( array(‘container_id’ => ‘nav’,’container_class’ => ‘navigation’,’container’ => ’’ ) ); ?>

in function.php :

if (function_exists(‘register_nav_memus’)) {

register_nav_menus(array('main_menu' =>'Main Navigation Menu'));
}

In js load :

The result is the menu not showing like my html version, it just list normal.

Best regards, Decneo

1180 posts
  • Affiliate Level 5
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
+2 more
mabuc
says

try this one..

<?php
wp_nav_menu( array( 'container_class' => 'menu', 'container_id' => 'dropdown', 'menu_id' => '', 'menu_class' => 'sf-menu' ) );
?>

HTML should be…

<nav id="dropdown" class="menu">
    <ul class="sf-menu"> </ul>
</nav>

Enqueue script..

wp_register_style( 'superfish-style', get_stylesheet_directory_uri() . '/js/superfish/superfish.css' );    
wp_register_script( 'superfish', get_template_directory_uri() . '/js/superfish/superfish.js' );    
wp_enqueue_style( 'superfish-style' );
wp_enqueue_script( 'superfish' );

I hope this helps.. :)

173 posts
  • Author Level 6
  • Collector Level 2
  • 4 Years of Membership
  • Exclusive Author
Decneo
says

try this one..
<?php
wp_nav_menu( array( 'container_class' => 'menu', 'container_id' => 'dropdown', 'menu_id' => '', 'menu_class' => 'sf-menu' ) );
?>

HTML should be…

<nav id="dropdown" class="menu">
    <ul class="sf-menu"> </ul>
</nav>

Enqueue script..

wp_register_style( 'superfish-style', get_stylesheet_directory_uri() . '/js/superfish/superfish.css' );    
wp_register_script( 'superfish', get_template_directory_uri() . '/js/superfish/superfish.js' );    
wp_enqueue_style( 'superfish-style' );
wp_enqueue_script( 'superfish' );
I hope this helps.. :)

Thank you for your replied mabuc. I will customize mine as yours then will let you know.

I’m not sure some jQuery effect not work but some jQuery work like flexslider, is it conflict with the superfish?

PS: all work fine in HTML Version,(also Every jQuery).

1180 posts
  • Affiliate Level 5
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
+2 more
mabuc
says


try this one..
<?php
wp_nav_menu( array( 'container_class' => 'menu', 'container_id' => 'dropdown', 'menu_id' => '', 'menu_class' => 'sf-menu' ) );
?>

HTML should be…

<nav id="dropdown" class="menu">
    <ul class="sf-menu"> </ul>
</nav>

Enqueue script..

wp_register_style( 'superfish-style', get_stylesheet_directory_uri() . '/js/superfish/superfish.css' );    
wp_register_script( 'superfish', get_template_directory_uri() . '/js/superfish/superfish.js' );    
wp_enqueue_style( 'superfish-style' );
wp_enqueue_script( 'superfish' );
I hope this helps.. :)

Thank you for your replied mabuc. I will customize mine as yours then will let you know.

I’m not sure some jQuery effect not work but some jQuery work like flexslider, is it conflict with the superfish?

PS: all work fine in HTML Version,(also Every jQuery).
if it’s conflict try to use jquery no conflict
var $j = jQuery.noConflict(); 
173 posts
  • Author Level 6
  • Collector Level 2
  • 4 Years of Membership
  • Exclusive Author
Decneo
says



try this one..
<?php
wp_nav_menu( array( 'container_class' => 'menu', 'container_id' => 'dropdown', 'menu_id' => '', 'menu_class' => 'sf-menu' ) );
?>

HTML should be…

<nav id="dropdown" class="menu">
    <ul class="sf-menu"> </ul>
</nav>

Enqueue script..

wp_register_style( 'superfish-style', get_stylesheet_directory_uri() . '/js/superfish/superfish.css' );    
wp_register_script( 'superfish', get_template_directory_uri() . '/js/superfish/superfish.js' );    
wp_enqueue_style( 'superfish-style' );
wp_enqueue_script( 'superfish' );
I hope this helps.. :)

Thank you for your replied mabuc. I will customize mine as yours then will let you know.

I’m not sure some jQuery effect not work but some jQuery work like flexslider, is it conflict with the superfish?

PS: all work fine in HTML Version,(also Every jQuery).
if it’s conflict try to use jquery no conflict
var $j = jQuery.noConflict(); 

Thank you very much mabuc,it’s work now without using jQuery.noConflict(); some of my js conflict the supperfish.

by
by
by
by
by
by