Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 06:44:51 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155534 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: superfish menu  (Read 4196 times)
snark
Guest
« on: June 16, 2010, 11:51:37 AM »

Is there anyone who can explaine  a bit more about implementing jquery plugins,

I need to use the superfish menu but I do not see how I can make this visible?

Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #1 on: June 16, 2010, 03:13:12 PM »

Hi,

You can take a look a code of SF menu: http://users.tpg.com.au/j_birch/plugins/superfish/#sample1

Then it will be easy for you to implement it..

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #2 on: June 16, 2010, 06:28:25 PM »

If you're using jQueryAdmin

* just install the plugin (download at http://www.websitebakers.com/pages/libs/jqueryadmin/jquery-library.php)
* add it to the default.jquery preset;
* include the droplet [[jQueryInclude]] in your page footer;
* make sure that your menu is created using an unordered list markup (<ul>)
* add class="sf-menu" to the <ul>

That's it.
Logged

Alle großen Veränderungen beginnen im Kleinen
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #3 on: June 16, 2010, 09:50:05 PM »

Oh cool, I didnt noticed that there is a SF menu in JQ Admin lib...

Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #4 on: June 19, 2010, 11:54:48 AM »

okay, so far it works, jqueryadmin seems to be very interesting...

question: how do I get the superfish menu to be displayed as nav-bar style?

Logged
snark
Guest
« Reply #5 on: June 20, 2010, 12:20:54 PM »

okay, I got that working, (the navbarstyle..)

with a bit of puzzling I managed to get the third level also in the navbar style

when I click on a subpage ( either second or third level) I want the menu to maintain the collapsed state so that the path to the page is shown in the menu ...

now it rolls back in as soon as the page is clicked

is it possible to leave it visible

( I atrached a screenshot of what I like it to look)



« Last Edit: June 20, 2010, 12:53:06 PM by snoork » Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #6 on: August 25, 2010, 01:55:43 PM »

If you're using SM2 to create the menu, just add

pathClass:  'menu-current'

to the superfish options.

See here for details: http://users.tpg.com.au/j_birch/plugins/superfish/#sample4
Logged

Alle großen Veränderungen beginnen im Kleinen
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #7 on: August 30, 2010, 09:48:01 AM »

"snoork" asked me for some more info.

So let's assume you have a template using show_menu2() to create the menu and jQueryAdmin installed.

The menu call looks like this:
Code:
<?php
              show_menu2
(
                  
0,
                  
SM2_ROOT,
                  
SM2_ALL,
                  
SM2_ALL|SM2_PRETTY,
                  
false,
                  
false,
                  
'<ul class="sf-menu sf-navbar">',
                  
false,
                  
false,
                  
false
              
);
?>


The important part is the '<ul class="sf-menu sf-navbar">'.

Okay, next, go to the Backend -> Admin-Tools -> jQueryAdmin and click on the "plus" icon next to the "Plugins" header. You'll get an upload window on top of the page. Upload the Superfish plugin you can download at AMASP.

After uploading, click on the "gear" icon next to the "default.jquery" preset and mark "Superfish" in the Plugins row. Save the changes.

You should now see your Superfish enhanced menu in the frontend, but there's a detail missing: you wish to keep the submenu open for the current root page.

This can be done by adding

pathClass: "menu-parent"

to the Superfish call. (Sorry, it's not menu-current as mentioned above.)

To add this, klick on the "Notepad" icon next to the "default.jquery" preset in the jQueryAdmin Tool and change the "pathClass" to "menu-parent".

Now, after clicking on a root menu entry that has children, the submenu should stay open.
Logged

Alle großen Veränderungen beginnen im Kleinen
snark
Guest
« Reply #8 on: September 01, 2010, 01:10:48 PM »

and pathlevels to 2

wonderful so far but ...

now the class menu-current does not work anymore, any way to solve this?




« Last Edit: September 01, 2010, 02:15:14 PM by snoork » Logged
Roych

Offline Offline

Posts: 149



« Reply #9 on: September 23, 2010, 10:33:01 PM »

Hello,

Don't know if this is the right place for this but anyway.
I have a problem viewing superfish menu with internet explorer. In FF and Chrome everything is working fine but in IE there are no hover submenus.

already tried the:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE6">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

any idea?

here is the test page!

http://www.feel-fun.com/wb

thank you!
Logged
mjm4842

Offline Offline

Posts: 227


« Reply #10 on: September 24, 2010, 06:47:16 AM »

I am using IE8 and everything seem to work except the sub-menu for Domov.

I have used Superfish in my templates with excellent success (so-so on mobile phones). When it fails, it's usually because of something in my own styles.

Looking at the source code, I notice the sub-menu code is actually but just not showing up. This leads me to believe that the problem is directly related to your own styles.

With best regards,

Mcihael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Roych

Offline Offline

Posts: 149



« Reply #11 on: September 24, 2010, 08:30:16 AM »

Oh yes today everything is working fine  grin only submenu for First menu doesent. But this one is going to be HOME button so it doesent need one really.

thx.
Logged
Roych

Offline Offline

Posts: 149



« Reply #12 on: September 24, 2010, 06:00:06 PM »

Hello now I have a nother question.

How do i put a litlle arrow like this  ( » ) in submenu who has sub sub menu?

my code now is:
Code:
<?php
              show_menu2
(
                  
0,
                  
SM2_ROOT,
                  
SM2_ALL,
                  
SM2_ALL|SM2_PRETTY,
                  
false,
                  
false,
                  
'<ul class="hover">',
                  
false,
                  
false,
                  
false
              
);
?>

Thank you!
Logged
mjm4842

Offline Offline

Posts: 227


« Reply #13 on: September 26, 2010, 10:33:13 AM »

Hi Roych,

Thank you for your question. Here is the lines of code I use to make SuperFish work with my templates:

In the <head> section:

Code:
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo TEMPLATE_DIR?>/sf/superfish.css" />
<script type="text/javascript" src="<?php echo TEMPLATE_DIR?>/sf/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php echo TEMPLATE_DIR?>/sf/hoverIntent.js"></script>
<script type="text/javascript" src="<?php echo TEMPLATE_DIR?>/sf/superfish.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
      $('ul.sf-menu').superfish({
          delay:       0,                 // one second delay on mouseout
          animation:   {opacity:'show'},  // fade-in and slide-down animation
          speed:       'fast',            // faster animation speed
          autoArrows:  true,              // false to disable generation of arrow mark-up
          dropShadows: true               // false to disable drop shadows
      });
  });
</script>

The arrows are enabled by setting the autoArrows line above to true.

In the <body> section, I use the following command to generate the menu:

show_menu2(
  0,
  SM2_ROOT,
  SM2_ALL,
  SM2_ALL,
  '<li>[a][menu_title]</a>',
  '</li>',
  '<ul class="sf-menu">',
  '</ul>'
);


When I started working with SuperFish, it just would no work properly until I stopped trying to adapt SuperFish to my my styles and simply adapted my template to SuperFish's styles styles instead. Then things became much easier.

I Never touch any of the SuperFish code or styles and simply override it's style settings in my own CSS file.

Hope this helps!

With warmest regards,

Michael Milette
« Last Edit: September 26, 2010, 10:36:33 AM by mjm4842 » Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Roych

Offline Offline

Posts: 149



« Reply #14 on: September 28, 2010, 09:53:17 AM »

Hi,

Sorry for the delay. Wink

I'we tried this but somehow doesn't work right for me. It shows me arrow only the first time when I move mouse over it, the second time menu doesent even (slide) hover out.

And the arrow was not pointing right but down.

any idea?

Thank you
Logged
mjm4842

Offline Offline

Posts: 227


« Reply #15 on: September 28, 2010, 05:32:54 PM »

Hi Roych,

I really your frustration. Those inconsistent bugs are a pain to deal with. As CSS is layered, it could be that they are there and just not appearing in the right order. Do you play around with z-order in your CSS? Does it have the same behaviour in other web browsers?

Sometimes when I have a CSS issue, it manifests itself differently in different browsers. How it appears in a different browser can often be key to identifying the real issue. If it works fine in one browser and not in another, that is a hint that your issue might be browser specific which is helpful because the Web has lots of information related to CSS and browser specific issues.

One tool that might help you is a plug-in for Firefox and Chrome is the "Web Developer v1.1.8" extension by Chris Pederick. It adds a toolbar to your browser full of troubleshooting tools. One of my favourite tools is in the Display Element Information option in the Information menu. When enabled, clicking on any element in your page will reveal the attributes, position, style ancestors and other useful information to help you figure out where a particular problem might be coming from. You can download it from http://chrispederick.com/work/web-developer/ or from the Firefox Add-on library at https://addons.mozilla.org if you are using Firefox. Sorry, it's not available for Internet Explorer. Another very popular Firefox add-on for web development is Firebug. I think it's just a matter of preference. Each of the two tools has it's own strength and weaknesses.

As for the arrows pointing down instead of right, there is no magic here. You will have to edit the graphic image and rotate the arrow. The default graphic that comes with SuperFish points down.

Don't give up! It would be a shame for you to quit not realizng just how close you are to actually succeeding.

With best regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Roych

Offline Offline

Posts: 149



« Reply #16 on: November 03, 2010, 11:07:31 AM »

Hello


I searched the forum but didn't find this so...

I'm using superfish menu almost the same as in AMASP and would like the current menu to be exatcly as in amasp.
So if you clik one of the submenues the root and the submenue would stay underlined or background colored just like in AMASP. How do I do that.

I tried the:
Code:
.menu-current {

text-decoration: underline;

}

But only the sub stays underlined


My SM2 code:
Code:
<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREEfalse"\n</li>"falsefalsefalse'<ul id="header_menu" class="menu">'); ?>

Thank you in advanced

R.
Logged
Roych

Offline Offline

Posts: 149



« Reply #17 on: November 03, 2010, 12:41:28 PM »

Anyone?  huh
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!