167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • 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

1179 posts
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 6-7 years
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.. :)

167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • 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).

1179 posts
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 6-7 years
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(); 
167 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 3-4 years
  • Europe
  • Bought between 10 and 49 items
  • 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