[jQuery] Re: Superfish navbar for Wordpress

2008-09-22 Thread kiper

Sweet!

That was a nice and simple solution. It works but I realized that I'll
have to change some of the CSS... :)

Many Thanks!

Müfit

On Sep 21, 9:57 am, Joel Birch [EMAIL PROTECTED] wrote:
 I just thought of a really simple solution for this. Before
 initialising Superfish simply dynamically add one common class to the
 elements that are of any of three WordPress classes.

 $('document').ready(function(){
   $('ul.sf-menu')
   
 .find('li.current_page_item,li.current_page_parent,li.current_page_ancestor')
     .addClass('current')
     .end()
   .superfish({
     pathClass : 'current'
   });

 });

 Joel Birch.

 On 18/09/2008,kiper[EMAIL PROTECTED] wrote:



  Hi Joel!

  I am just happy if I can contribute to make Superfish even better!

  All the best,

  Müfit

  On Sep 18, 5:29 am, Joel Birch [EMAIL PROTECTED] wrote:
  Hi Müfit,

  Thanks for your well-articulated thoughts on this. I agree that being
  able to specify more that one pathClass would be very useful for
  WordPress generated menus. I will aim to get this in as a Superfish
  feature as soon as possible, although I'm snowed under with work for
  the next few weeks.

  Thanks again for the great feedback. I wish I could offer more immediate
  help.

  Joel Birch.


[jQuery] Re: Superfish navbar for Wordpress

2008-09-18 Thread kiper

Hi Joel!

I am just happy if I can contribute to make Superfish even better!

All the best,

Müfit

On Sep 18, 5:29 am, Joel Birch [EMAIL PROTECTED] wrote:
 Hi Müfit,

 Thanks for your well-articulated thoughts on this. I agree that being
 able to specify more that one pathClass would be very useful for
 WordPress generated menus. I will aim to get this in as a Superfish
 feature as soon as possible, although I'm snowed under with work for
 the next few weeks.

 Thanks again for the great feedback. I wish I could offer more immediate help.

 Joel Birch.


[jQuery] Superfish navbar for Wordpress

2008-09-17 Thread kiper

Hi there!

First, I just want to say thank you for Superfish that is a truly
great navigation component (maybe THEgreatest)!

I have integrated Superfish with Wordpress and it works really smooth.
But when I made a design with a navbar and tried to find a working
solution I just failed. Superfish is working to 90% but it will not
keep the current submenu open if only the main menu level item is
selected. The reason for this is that Wordpress uses two (three)
different 'current' classes: 'current_page_item' ,
'current_page_ancestor' and 'current_page_parent'. The last two are
interchangeable.
The problem arises because pathClass can only have one 'current'
class.
If you choose 'current_page_item' as the 'current' class you will have
a menu that is working as it should until you click on a submenu item.
This will make the submenu disappear.
If you choose 'current_page_ancestor' or 'current_page_parent' as the
'current' class you get the opposite problem:
If you only have a main menu item selected then you will not see the
submenu unless you hover over the main menu tabs but if you select a
submenu item the submenu is visible as it should be.

Now, it is possible to solve this by removing Wordpress superfluos
classes and just keep one: 'current_page_item'.
But this becomes a problem when you create sites for clients that
updates their wordpress installations by themselves. When they
overwrite the old files they will get the problem again!

So, is there another way to solve this? Is it possible to give
pathClass several 'current' classes? Is there anyone out there with a
navbar solution for Wordpress?

Would truly appreciate an answer to this!

Sincerely,

Müfit Kiper