Aleksandar • Vacić

iOS bits and pieces

ADxMenu2 - the usability script

There are situations when the drop-down multilevel menu will go outside the visible area of the page. It is either too long or has two or three sub levels (I certainly don’t recommend more than that).

Such menu is highly unusable and there are two solutions:

  • Re-arrange the layout elements so that menu fits on the page in reasonable space

  • Apply the script that will reposition the menu

An example of bad and good user experience

Child selectors and more...in IE/Win!

Oh my goodness, this is so good. Just when I wrote that child selectors are not possible in IE, Dean Edwards is proving me wrong. He is writing a behavior that will bring most of the wonderful CSS2 stuff (and even some CSS3) to rusty IE5+ on Win. And it’s available under Creative Commons licence.

Read all about it here, and behold the progress here. I’m so excited about this that I’m barely holding myself not to bug Dean about the progress and when he is expecting to finish. From my own experience I know that work is best done when not rushed.

Keep up the good work Dean.

ADxMenu2 - pure CSS multilevel menus

A new way to accomplish multilevel menus without the Javascript. Peter Nederlof has created a behavior that adds arbitrary :hover support for IE/Win. That means that IE will now recognize li:hover, thus giving us more degrees of freedom for menu creation.

That means that basic functionality does not depend on user’s preference regarding Javascript. You can include the script only if you want to add additional usability features: off-screen positioning check, as well as placing menus over drop-downs (WCH).

I have slightly changed the way CSS is built. All of them now depend on li:hover. Peter’s behavior deals with IE’s lack of support, but only on windows. That means that ADxMenu 2 menus will not work in Mac IE, Opera 6 and any other browser that doesn’t fully support :hover pseudo-element.

Major improvement: this CSS finally solves the “phone-book” problem in IE/Win, and sub menus can be normally repositioned, not one over another.

WCH 2

After the last post, I knew that only IE/Win had any benefit from this script. This way I was able to streamline the script and completely remove the dependency on other scripts. It’s not even needed to do anything on the page load. I also removed the support for IE 5.0 and concentrated on iFrame technique. And it’s a lot smaller: 4.65kB, heavily commented.

Script now has only three functions. WCH_Hider() does all the browser checks and creates the hiding iFrame. WCH_HideWndCtrl() is placing the hider below the layer that needs to go over windowed controls. WCH_ShowWndCtrl is removing the hider.

For those of you wondering what this is all about…read this entry that will explain the problem at hand. Now, on to version 2. I will still explain every part of the script, as I think that this version should be used in the future - it’s much smaller, faster, independent…simply better.