[jQuery] Re: Open a particular menu in accordion based on value passed to it

2009-04-20 Thread TenzoChris

I wrote a quick accordion pattern that uses the anchor attribute of a
url to determine which panel should be expanded by default:
http://skulljackpot.com/2009/03/30/quick-and-dirty-but-useful-jquery-accordion-pattern/

It'd let you write links like http://example.com/path/to/page#menu-2,
and have that panel begin in an expanded state.

Chris

On Apr 19, 6:49 pm, abhishekgal...@gmail.com
abhishekgal...@gmail.com wrote:
 Hi All,

 I am using JQuery accordion to create a menu box , my problem is that
 say if I have 4 containers (Divs/menu ) and at runtime I want to open
 one of them depending upon the variable passed.

 I know using the option active:2 will open the 2nd container but can
 anyone please tell me what is the syntax to set it dynamically...

 for example ,If i have something like this ...
 Menu 1
           a
           b
 Menu 2
           c
           d
 Menu 3
           e
           f

 now If I want to open Menu 2 depending upon some value passed , how do
 we do that ?


[jQuery] SuperSelectors - a jQuery plugin that enables full CSS 2.1 selector support (even in IE6)

2009-04-20 Thread TenzoChris

Hey there-

I recently finished up a plugin that I think has the potential to be
really useful for folks. It uses jQuery's excellent selector support
to work around some of the crummy CSS selector support in legacy
browsers.

If you've ever had to spend time adding 'class=radio' to all the
radio buttons on your site, this plugin is for you.
If you've ever had to add 'class=first' to an list item because not
all of your target browsers support 'li:first', this plugin is for
you.
If you've ever had to add any class to your markup simply to work
around CSS selector support, this plugin is for you.

I've posted a novice-friendly writeup at
http://skulljackpot.com/2009/04/19/super-css-selector-support-with-jquery/
- but you can also pull the code directly from github at
http://github.com/chrispatterson/jquery-super-selectors/tree/master

There are some additional enhancements I've been kicking around, but
I'd love to hear feedback from folks about how to make this more
useful for their particular needs.

Chris





[jQuery] Re: Superfish menus in nav-bar style require subnavs to behave correctly?

2009-04-15 Thread TenzoChris

I got feedback privately complaining about my example.

I'd chosen to just use the plugin page (with a minor edit) to
demonstrate the problem without wasting people's time on potential CSS
causes, since the problem also manifests using the demonstration page.
I should have done a better job explaining my rationale.

Since that approach has proven confusing for some folks, I've created
a stripped-down version, visible at 
http://sandbox.skulljackpot.com/superfish-stripped.html

The second menu item begins highlighted. If you inspect it, you can
see that the sfHover class has been added by superfish (which is
great, and what we want). Notice that if you mouse over any of the
other menu items which have submenus, the sfHover class is removed
from the original item, and added to the menu item you've hovered
over. This is also desired / expected behavior.

Now hover over the rightmost menu item. Notice that the sfHover class
is not removed from the originally-selected menu item, and two top-
level menu items appear highlighted simultaneously.

The desired behavior is for sfHover to be removed from all top-level
menu items when mousing over *any* sibling (regardless of whether
there's a child ul element), while preserving how the current item
is treated (namely, that the top-level menu item in that chain gets
sfHover added upon initialization, as well as when no menu items are
being moused over).

Chris

On Apr 14, 7:38 pm, dimmerswitch dimmerswi...@gmail.com wrote:
 Hey there-

 I'm working on integratingSuperfishmenus and have run into an odd  
 problem. It's *looking* like the deselection  hover behavior is  
 predicated on all the top-level li elements having nested ul,  
 which makes me think I've missed something obvious.

 In an attempt to rule out any CSS silliness, I've used the sample page  
 (fromhttp://users.tpg.com.au/j_birch/plugins/superfish/#sample4) for  
 my test case.

 To see the issue, compare the behavior for examples  nav-bar style  
 from the original sample with my test 
 athttp://sandbox.skulljackpot.com/superfish-local.html#sample4
   - mousing over the rightmost menu item doesn't cause the current  
 element to be deselected.

 Is there a reasonable way to get consistent results for mouseover  
 behavior, regardless of whether or not a given element has a nested  
 ul?

 Chris