<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aleksandar Vacić &#187; ADxMenu</title>
	<atom:link href="http://aplus.rs/category/adxmenudev/feed/" rel="self" type="application/rss+xml" />
	<link>http://aplus.rs</link>
	<description>aplus.rs</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:09:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>IE8 beta2 considered harmful</title>
		<link>http://aplus.rs/adxmenudev/ie8-beta2-considered-harmful/</link>
		<comments>http://aplus.rs/adxmenudev/ie8-beta2-considered-harmful/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 11:53:17 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[ie8]]></category>

		<guid isPermaLink="false">http://aplus.rs/?p=447</guid>
		<description><![CDATA[IE8 beta2 is very much a work in progress. It has some serious bugs, some of which unfortunately render my menu not working at all. Bummer.
Update: fixed in IE8 RC1.]]></description>
			<content:encoded><![CDATA[<p>I was notified that ADxMenu does not work in IE8 beta2. Apparently, it suffers from <a href="http://www.brunildo.org/test/IE8beta2-CSS-bugs.html">several CSS bugs</a> that are triggered by my menu. Nothing to actually do about it, only hope that Microsoft developers will fix these soon.</p>
<p>These bugs are introduced in the beta2, as the menu was working fine with beta1. New IE engine’s growing hickups, I guess.</p>
<p>Update: Microsoft developers fixed this in IE8. My menu is working just fine there.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/ie8-beta2-considered-harmful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small update for ADxMenu</title>
		<link>http://aplus.rs/adxmenudev/small-update-for-adxmenu/</link>
		<comments>http://aplus.rs/adxmenudev/small-update-for-adxmenu/#comments</comments>
		<pubDate>Wed, 28 May 2008 09:51:48 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://aplus.co.yu/?p=333</guid>
		<description><![CDATA[I implemented the latest version of the ADxMenu script in company’s web sites and found a problem. I use the full version of DOMLoaded.js script for those websites and ADxMenu.js ...]]></description>
			<content:encoded><![CDATA[<p>I implemented the latest version of the <a href="/adxmenu/">ADxMenu</a> script in company’s web sites and found a problem. I use the full version of <a href="http://www.cherny.com/webdev/27/domloaded-updated-again">DOMLoaded.js</a> script for those websites and ADxMenu.js internally uses just the IE part of the same script.<br />
When loaded both, they collide and ADxMenu’s <code>Setup()</code> is never called.</p>
<p>I have recoded this so that my script is now completely independent of anything else on the page. Everything is up, so you can re-download the script and use it.</p>
<p>p.s. This is 300th post on my blog. I find it nice that it’s ADxMenu themed.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/small-update-for-adxmenu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADxMenu accessibility update for IE6</title>
		<link>http://aplus.rs/adxmenudev/adxmenu-accessibility-update-for-ie6/</link>
		<comments>http://aplus.rs/adxmenudev/adxmenu-accessibility-update-for-ie6/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 21:58:03 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://aplus.co.yu/?p=329</guid>
		<description><![CDATA[Aaron J. Young from OUHSC recently wrote with question: I was wondering how one might be able to modify your ADxMenu so that if someone has IE6 and Javascript disabled ...]]></description>
			<content:encoded><![CDATA[<p>Aaron J. Young from <a href="http://www.ouhsc.edu/">OUHSC</a> recently wrote with question:</p>
<blockquote><p>
I was wondering how one might be able to modify your ADxMenu so that if someone has IE6 and Javascript disabled it would simply show the entire tree menu.
</p></blockquote>
<p>I prefer to add actual links to main menu items and have sub navigation shown on each of those pages. However, this is reasonable request that improves the accessibility of the menu, thus I looked into possible solution. I wanted to avoid changing HTML for the menu and I think I came up with good solution — keeping in mind that this will be seen and executed only by IE6.</p>
<p>The main <a href="/adxmenu/examples/">four menu examples</a> are updated, as well as downloadable archive. There’s also <a href="/adxmenu/examples/ie6-double-style/">one new example</a> that shows how you can create two different styles, one when Javascript is enabled and one when it’s disabled.</p>
<p><span id="more-329"></span></p>
<h3>How it works</h3>
<p>Part of the CSS that initially hides submenus is this:</p>
<div class="igBar"><span id="lcss-7"><a href="#" onclick="javascript:showPlainTxt('css-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-7">
<pre class="css">
<ol>
<li style="color:#333;">
<div style=""><span style="color: #6666ff;">.menu </span>ul <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000000; font-weight: bold;">visibility</span>: <span style="color: #993333;">hidden</span>;</div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>Thus, for IE6, that had to be removed and activated only if Javascript works. Which means that now, inside the conditional comments I have this:</p>
<div class="igBar"><span id="lcss-8"><a href="#" onclick="javascript:showPlainTxt('css-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-8">
<pre class="css">
<ol>
<li style="color:#333;">
<div style=""><span style="color: #6666ff;">.menu </span>ul <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000000; font-weight: bold;">visibility</span>: <span style="color: #993333;">visible</span>;</div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">static</span>;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>and the new version of the <a href="/adxmenu/examples/code/ADxMenu.js">ADxMenu.js</a> contains this bit (it’s all one line, broken here to be more understandable):</p>
<div class="igBar"><span id="ljavascript-9"><a href="#" onclick="javascript:showPlainTxt('javascript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-9">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;'</span> +</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #3366CC;">'.menu ul {visibility:hidden; position:absolute;}'</span> +</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #3366CC;">'&lt;/style&gt;'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>I avoid <code>document.write</code> in my code as much as possible — the correct place to do this would be in the <code>Setup</code> method, for each menu found on the page. However, that means that menu will be visible even with Javascript ON, for that brief moment or two until script kicks in. Since this is custom made only for IE6, shown code line is better solution.</p>
<h3>A step further: different styles</h3>
<p>I have a hard time visualizing menu that would look acceptable with Javascript on/off and to use the same styles. Even with simple and short menus, I don’t think it would look fine in most cases.</p>
<p>Given that, the script now has this line:</p>
<div class="igBar"><span id="ljavascript-10"><a href="#" onclick="javascript:showPlainTxt('javascript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-10">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">aTmp<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">className</span> = aTmp<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">className</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"adxie"</span>, <span style="color: #3366CC;">""</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>where <code>aTmp</code> is an array of menu elements that have the <code>adxm</code> class. This requires you to add one more class to the main list, like this:</p>
<div class="igBar"><span id="lhtml-11"><a href="#" onclick="javascript:showPlainTxt('html-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-11">
<pre class="html">
<ol>
<li style="color:#333;">
<div style=""><span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">&lt;ul</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"adxm menu adxie"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>Using this class, you can then create IE6-only styles for the case when Javascript is OFF and leave the usual menu styles for the case when Javascript is ON. For this to work, make sure you write the JS-ON styles first, then the JS-OFF below them. The <a href="/adxmenu/examples/ie6-double-style/">new example</a> shows just that.</p>
<p>If changing the menu HTML is not an option — like too many existing pages to be updated in reasonable time — then you can do the reverse thing. Comment-out the previous line in the script and uncomment this one:</p>
<div class="igBar"><span id="ljavascript-12"><a href="#" onclick="javascript:showPlainTxt('javascript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-12">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">aTmp<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">className</span> += <span style="color: #3366CC;">" adxie"</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>Thus, you can use your existing <code>menu</code> class to style the JS-OFF solution and <code>adxie</code> to style the drop-down case (JS-ON). First solution is noticeably easier to do and maintain, so go with it if possible.</p>
<p>I took this opportunity to rewrite the script a bit, nothing really important. There you go, 1st update of the menu since January last year. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/adxmenu-accessibility-update-for-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADxMenu v4.10</title>
		<link>http://aplus.rs/adxmenudev/adxmenu-v410/</link>
		<comments>http://aplus.rs/adxmenudev/adxmenu-v410/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 21:31:58 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/adxmenudev/adxmenu-v410/</guid>
		<description><![CDATA[After finishing this update, I had yet another moment of how in the hell I didn’t figured this before. You know the feeling — you struggle with certain code for ...]]></description>
			<content:encoded><![CDATA[<p>After finishing this update, I had yet another moment of <q>how in the hell I didn’t figured this before</q>. You know the feeling — you struggle with certain code for weeks or months, and then after you surrender to the reality and code the “just work, bitch” parts, you realize the simple solution was waiting just around the corner of your mind.</p>
<p>With several simple lines in the script, I can now use <em>much</em> simpler IE6-only CSS. Menus now work with any number of levels, without the need to update the ugly <code>.menu .adxmhover ul, .menu .adxmhover .adxmhover ul, .menu .adxmhover .adxmhover .adxmhover ul....</code> rules.<br />
Even better, you now have — in IE6 — direct (not simulated) replacements for the following selectors:</p>
<ul>
<li><code>li:hover</code></li>
<li><code>li:hover>a</code></li>
<li><code>li:hover>ul</code></li>
</ul>
<p><span id="more-270"></span></p>
<h3>Script changes</h3>
<p>It’s so simple.<br />
I’m using script for IE6, in which I’m already using this replication of <code>li:hover</code>:</p>
<div class="igBar"><span id="ljavascript-17"><a href="#" onclick="javascript:showPlainTxt('javascript-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-17">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">oLI.<span style="color: #006600;">onmouseenter</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">className</span> += <span style="color: #3366CC;">" adxmhover"</span>;</div>
</li>
<li style="color:#333;">
<div style="">...</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #66cc66;">&#125;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>which is then used in IE6-only styles as <code>li.adxmhover</code>. Well, why not add more replacements? With this:</p>
<div class="igBar"><span id="ljavascript-18"><a href="#" onclick="javascript:showPlainTxt('javascript-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-18">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">oLI.<span style="color: #006600;">UL</span> = oLI.<span style="color: #006600;">getElementsByTagName</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"ul"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="color:#26536A;">
<div style="">oLI.<span style="color: #006600;">A</span> = oLI.<span style="color: #006600;">getElementsByTagName</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"a"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="color:#333;">
<div style="">oLI.<span style="color: #006600;">onmouseenter</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">...</div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">UL</span>.<span style="color: #006600;">className</span> += <span style="color: #3366CC;">" adxmhoverUL"</span>;</div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">A</span>.<span style="color: #006600;">className</span> += <span style="color: #3366CC;">" adxmhoverA"</span>;</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #66cc66;">&#125;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>I can replace <code>li:hover>a</code> with <code>a.adxmhoverA</code> and <code>li:hover>ul</code> with <code>ul.adxmhoverUL</code>.</p>
<p>No need to simulate anything, simply repeat the style rules in IE6-only part using replacement class selectors and…that’s it. You can of course update the script and add replacements for other advanced selectors, but this is basically all that I ever needed in menu styling.</p>
<h3>CSS changes</h3>
<p>The whole thing started with IE7 problems with <code>display</code> property. I recoded CSS to use <code>visibility</code> instead, but then Safari went scrollbars-crazy — it was due to this:</p>
<div class="igBar"><span id="lcss-19"><a href="#" onclick="javascript:showPlainTxt('css-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-19">
<pre class="css">
<ol>
<li style="color:#333;">
<div style="">li <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">static</span>; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="color:#26536A;">
<div style="">li<span style="color: #3333ff;">:hover </span><span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>; <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>I then tried this:</p>
<div class="igBar"><span id="lcss-20"><a href="#" onclick="javascript:showPlainTxt('css-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-20">
<pre class="css">
<ol>
<li style="color:#333;">
<div style="">li <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">relative</span>; <span style="color: #000000; font-weight: bold;">z-index</span>: <span style="color: #cc66cc;color:#800000;">5</span>; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="color:#26536A;">
<div style="">li<span style="color: #3333ff;">:hover </span><span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">z-index</span>: <span style="color: #cc66cc;color:#800000;">10000</span>; <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>but IE7 ignored <code>z-index</code> change. Now really on the end of my nerves, I coded horrible positioning trickery (horizontal bottom-top variant was the worst) to minimize all problems. Luckily, good man David <a href="/css/ie7-bug-will-not-render-z-index-change-on-lihover/#comment-16755">pin-pointed</a> solution for IE7’s <code>li:hover</code> issue.</p>
<p>At this point, I was so happy :) that it’s no wonder ideas sparked all over the place and dust was off the mind corner where replacement class selectors peacefully nap.</p>
<h3>Wrap up</h3>
<p><a href="/adxmenu/instructions/">Instructions</a> page is updated, <a href="/adxmenu/trouble/">Troubleshooting</a> is a lot shorter and 4 basic <a href="/adxmenu/examples/">examples</a> are updated to latest code.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/adxmenu-v410/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>ADxMenu v4 — flyout (drop-down) menu</title>
		<link>http://aplus.rs/adxmenudev/adxmenu-v4-flyout-drop-down-menu/</link>
		<comments>http://aplus.rs/adxmenudev/adxmenu-v4-flyout-drop-down-menu/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 23:01:00 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/adxmenudev/adxmenu-v4-flyout-drop-down-menu/</guid>
		<description><![CDATA[v4 is online for some time now and people have already used it. This version is the result of the months and months of experience implementing previous version on all ...]]></description>
			<content:encoded><![CDATA[<p><a href="/adxmenu/">v4 is online</a> for some time now and people have already used it. This version is the result of the months and months of experience implementing previous version on all kinds of web sites. </p>
<p>I have changed the basic CSS, but just a bit, mainly simplified it. Important changes from the v3 are:</p>
<ol>
<li>Completely clean HTML inside the menu — there are no classes, no IDs</li>
<li>Behavior component (.htc) is not used anymore — it uses plain Javascript</li>
<li>Instant execution of the IE script, thus making the menu usable even before the entire page content is downloaded</li>
<li>WCH is not part of the script, but it uses it if it’s available <small>You must include WCH.js before the ADxMenu.js for this to work</small></li>
<li><code>li:hover</code> is not simulated automatically, you must write the CSS yourself, using <code>adxmhover</code> class</li>
<li>Submenu opening now gives you certain degree of freedom — they will not disappear if you move the mouse slightly off the submenu</li>
<li>Much, much quicker in IE than v3</li>
</ol>
<p><span id="more-249"></span><br />
The most important improvement is certainly the last one. I <a href="/adxmenudev/end-of-the-road/">wrote</a> 1.5 years ago about the speed issues of the ADxMenu v3. The good thing about the <a href="/adxmenudev/the-ultimate-drop-menu/">.htc-based version</a> is great CSS ease of use; bad thing: only usable for small menus. I posted a quick JS-based fix back then, but it was applicable only in controlled cases. For longer menus it was simply not good enough, and usability is what counts in the end. This version is speed beast.</p>
<p>This new version is simplification effort. I have gave up on the “ultimate”, “enterprise” and similar adjectives. From the implementation questions I receive on the daily basis, I realized that it’s not really possible to make it work in like 1–2-3, for all people and for all cases. Thus, the clean-up.</p>
<h3>The cleanest HTML you can imagine</h3>
<p>The basic CSS and the script require no IDs and no classes inside the menu body. The only thing required is that you put <code>class="adxm"</code> on the main ul element and that’s it. In browsers supporting <code>li:hover</code> and <code>li&gt;ul</code> selectors, that is all that’s needed.<br />
Obviously, if you have more than one menu on the page, then you would use something like: <code>class="menutop adxm"</code> and <code>class="sidemenu adxm"</code>.</p>
<p>Any other classes and IDs you add can be used to implement complicated designs, icons or whatever.</p>
<h3>Javascript for IE6</h3>
<p>If you look at the source code of the <a href="/adxmenu/examples/">examples</a>, you will see how easy is to add it:</p>
<div class="igBar"><span id="lcode-24"><a href="#" onclick="javascript:showPlainTxt('code-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-24">
<pre class="code">
<ol>
<li style="color:#333;">
<div style="">&lt;!--<span style="color:#006600; font-weight:bold;">&#91;</span>if lte IE <span style="color:#800000;color:#800000;">6</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;</div>
</li>
<li style="color:#26536A;">
<div style="">&lt;script type=<span style="color:#CC0000;">"text/javascript"</span> src=<span style="color:#CC0000;">"ADxMenu.js"</span>&gt;&lt;/script&gt;</div>
</li>
<li style="color:#333;">
<div style="">&lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>endif<span style="color:#006600; font-weight:bold;">&#93;</span>--&gt; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>What does it do? It looks for all <code>ul</code> elements with the class of <code>adxm</code>. Then for each of them fetches all <code>li</code> elements and looks for those that have nested lists. It attaches the following two event handlers on matched <code>li</code> elements:</p>
<div class="igBar"><span id="ljavascript-25"><a href="#" onclick="javascript:showPlainTxt('javascript-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-25">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style=""><span style="color: #009900; font-style: italic;">// li:hover</span></div>
</li>
<li style="color:#26536A;">
<div style="">oLI.<span style="color: #006600;">onmouseenter</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">position</span> = <span style="color: #3366CC;">"relative"</span>;</div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">className</span> += <span style="color: #3366CC;">" adxmhover"</span>;</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #009900; font-style: italic;">//	li:blur</span></div>
</li>
<li style="color:#333;">
<div style="">oLI.<span style="color: #006600;">onmouseleave</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">position</span> = <span style="color: #3366CC;">"static"</span>;</div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">className</span> = <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">className</span>.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/adxmhover/</span>,<span style="color: #3366CC;">""</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #66cc66;">&#125;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>The newly created class can then be used to replicate the <code>:hover</code> and the child selector, in the following manner:</p>
<div class="igBar"><span id="lcss-26"><a href="#" onclick="javascript:showPlainTxt('css-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-26">
<pre class="css">
<ol>
<li style="color:#333;">
<div style=""><span style="color: #6666ff;">.adxmhover </span>ul,</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #6666ff;">.adxmhover </span><span style="color: #6666ff;">.adxmhover </span>ul <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#333;">
<div style="">	<span style="color: #000000; font-weight: bold;">visibility</span>: <span style="color: #993333;">visible</span>;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="color:#333;">
<div style="">&nbsp;</div>
</li>
<li style="color:#26536A;">
<div style=""><span style="color: #6666ff;">.adxmhover </span>li ul,</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #6666ff;">.adxmhover </span><span style="color: #6666ff;">.adxmhover </span>li ul <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #000000; font-weight: bold;">visibility</span>: <span style="color: #993333;">hidden</span>;</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p>Easy peasy.</p>
<p>Why the position setting? It’s a well known fact that IE6 has faulty implementation of positioning context stacking. That leads to huge problems, one of which is illustrated in the <a href="/css/ie6-posctxstacking/">short example</a> I mocked up, where that line is deleted from the script. Using this line, only the currently hovered item has the <code>position</code> set to <code>relative</code> and thus there are no problems with context stacking.</p>
<h3>Speed daemon</h3>
<p>Consequence of this positioning trickery is that IE is constantly re-rendering the page, since <code>position:relative</code> changes the position of the nested submenu. This is the major source of the speed issues in IE, when mouse is quickly moved up/down on the large menu. Take a look at the example using <a href="/adxmenu/htc-perf/">old .htc-based code</a>, in IE (you can witness the freeze at the start of the page while .htc works). Hover any item in left-hand menu, for instance soccer or horse racing. Then move the mouse up and down — IE will visibly lag behind your movement. When looked in Firefox, all is breeze, as they implement context stacking properly and do not require this position trickery.</p>
<p>And now look at the same page design, same menus, but <a href="/adxmenu/v4-perf/">using v4</a>. Repeating the test from above, you can see that everything is breeze in IE too.</p>
<h3>Usability</h3>
<p>The advantage no.3 from the list at the post start. <em>Huge usability improvement</em>, especially on large, heavy pages. Having the script executing practically immediately after .html page downloads, without the wait on flash files, videos, images — this is my second favourite feature of the new version. I have prepared the example that <a href="/adxmenu/examples/domonload/">demonstrates this</a> — menu is working in IE before the image has finished downloading. <small>You people with those damn fast internet links might not even notice this, if the image downloads in few secs. We, ones with cheaper tickets, have no such “problem”.</small></p>
<p>All thanks goes to <a href="http://dean.edwards.name/weblog/2006/06/again/">Dean Edwards</a>, <a href="http://www.outofhanwell.com/blog/index.php?title=using_window_onload_over_https">Matthias Miller</a> and <a href="http://ejohn.org/">John Resig</a>, plus <a href="http://www.cherny.com/webdev/27/domloaded-updated-again">Rob Cherny</a> for a lovely script I use.</p>
<h3>Onmouseenter, onmouseleave</h3>
<p>These two event handlers are IE-specific. Very useful little devils. I have used them on the latest variants of the v3, but I mention them here mainly to illustrate how much better they are, for this case, then <code>onmouseover</code> and <code>onmouseout</code>. <a href="/adxmenu/iemouseeventhdltest/">The example</a> (open it in IE) open small window in the top right corner and populates it each time any of these 4 handlers are called. Move your mouse around the menu and be ready to puke at the number of times onmouseover/out are called. </p>
<div class="screenshot"><img src="/images/adxmenu/v4/mousevents.png" alt="Mouse events" /></div>
<p>This nicely influence the speed, in all the good ways.</p>
<h3>A degree of freedom</h3>
<p>Credits for this goes to John Gallant of the PiE fame. In his <a href="http://www.positioniseverything.net/css-dropdowns.html">flyout menu example</a>, he implemented a fabulous little trick, shown on the following screenshot.</p>
<div class="screenshot"><img src="/images/adxmenu/v4/safearea.png" alt="Mouse events" /></div>
<p>He placed each of the nested lists inside a div, which was slightly larger than the list itself, by adding <code>padding</code> to it. The whole div is then negatively margined for the same value used for padding. Since div is transparent, you don’t see this, but you notice that submenus does not disappear when your hand slips a bit off the submenu. Not 100% slip-proof, but very close.</p>
<p>My examples are so simple, that I don’t even need the extra element and use the nested <code>ul</code> elements for that, while all the styles are applied on the <code>li</code> elements.</p>
<h3>Your turn</h3>
<p>There you go. Checkout my simple <a href="/adxmenu/examples/">examples</a>, fly through the <a href="/adxmenu/instructions/">instructions</a> and don’t forget to check the <a href="/adxmenu/trouble/">Troubleshooting</a> section if you have problems.</p>
<p>And implement, implement, implement…</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/adxmenu-v4-flyout-drop-down-menu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>IE7 is ADxMenu compatible</title>
		<link>http://aplus.rs/adxmenudev/ie7-is-adxmenu-compatible/</link>
		<comments>http://aplus.rs/adxmenudev/ie7-is-adxmenu-compatible/#comments</comments>
		<pubDate>Tue, 21 Mar 2006 16:47:54 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/adxmenu/ie7-is-adxmenu-compatible/</guid>
		<description><![CDATA[It really is. I just tried latest IE7 beta 2 (so called MIX06 release) and examples work as expected (did not fully tested though, just the basics).]]></description>
			<content:encoded><![CDATA[<p>It really is.</p>
<p>I just tried latest IE7 beta 2 (so called MIX06 release) and examples work as expected (did not fully tested though, just the basics).</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/ie7-is-adxmenu-compatible/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ooooh, yes!</title>
		<link>http://aplus.rs/adxmenudev/ooooh-yes/</link>
		<comments>http://aplus.rs/adxmenudev/ooooh-yes/#comments</comments>
		<pubDate>Sat, 30 Jul 2005 22:37:12 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/adxmenu/ooooh-yes/</guid>
		<description><![CDATA[# CSS 2.1 Selector support (child, adjacent, attribute, first-child etc.) Thus, from IE7 beta 2 (maybe) and IE 7 final (for sure) ADxMenu will work without helper scripts (at least ...]]></description>
			<content:encoded><![CDATA[<blockquote cite="http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx">
<p>
# CSS 2.1 Selector support (child, adjacent, attribute, first-child etc.)
</p>
</blockquote>
<p>
Thus, from <a href="http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx">IE7 beta 2</a> (maybe) and IE 7 final (for sure) <a href="/adxmenu/examples/">ADxMenu</a> will work without helper scripts (at least in the standard version). The long walk towards <em>IE6 1%</em> records will then begin.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/ooooh-yes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>End of the road?</title>
		<link>http://aplus.rs/adxmenudev/end-of-the-road/</link>
		<comments>http://aplus.rs/adxmenudev/end-of-the-road/#comments</comments>
		<pubDate>Sat, 07 May 2005 11:14:12 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/adxmenu/end-of-the-road/</guid>
		<description><![CDATA[My beloved nested menu is having hard time on my latest project.]]></description>
			<content:encoded><![CDATA[<p>
My long-time readers may remember that, back in the early days, ADxMenu had two versions. One that used .htc file and only one set of styles and the other that used only javascript but two sets of styles. The reason was that .htc version at that time used original Peter Nederlof’s csshover.htc which went through entire document looking for elements to apply <code>:hover</code> trickery and thus had far from good performance on very long pages.<br />
Things changed when I recoded it to work only with menu elements and ADxMenu 3 utilized it to its fullest potential.
</p>
<p>
However, performance issues are not defeated yet. In the last project I’m working on, I have three menus on one page and two of them are very large. The page itself also features a great deal of various positioning, using both floats and pos/abs position. Accompanied with these three menus, this brings IE to its knees — it takes him 4-5s on P4-2.8GHz with half-gig of RAM to render that page and execute the .htc. 90% of that freeze time goes on .htc processing.<br />
But not only that. Since my css applies <code>position:relative</code> on <code>li:hover</code> and thus does the actual positioning in that moment, re-rendering of the page takes some time and going from one menu option to another has a very noticeable lag. Last time I have seen such behavior was with Netscape Navigator 4. Sigh…
</p>
<p><span id="more-157"></span></p>
<p>
I created <a href="/adxmenu/htc-perf/">test page</a> with completely stripped-down page leaving just menus where you can still notice the lag, both on page load and when traversing the left-hand menus — for a fraction of second you can see the busy cursor popping up. The numeric value in the middle is how long it takes IE to complete the .htc processing. And than imagine how this looks like when Sports menu has 3x more items (as is the case on production environment).
</p>
<p>
I spent entire afternoon, measuring where is all this time spent. It appears that each <code><em>currentStyle</em>.addRule</code> call takes about 50-60ms, and some 1s is lost on function calls overhead. I don’t see a solution with .htc anymore as it seems that IE’s Trident engine has its limits. Pages that use heavy positioning are simply not what IE can handle well. I could be wrong, but the more positioning I add, the less responsive it becomes.
</p>
<p>
It is time for different IE strategy. I could easily end up dumping .htc all together and go back to Javascript and delayed initialization. This could prove to be a <a href="/adxmenu/intro/#troubleshoot">good thing after all</a>.
</p>
<p class="update">
For those interested, I resolved the perfomance problem by completly removing .htc, rewriting the design rules so that none of them used <code>li:hover</code> and execute this script on <code>window.onload</code>:
</p>
<div class="igBar"><span id="ljavascript-27"><a href="#" onclick="javascript:showPlainTxt('javascript-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-27">
<pre class="javascript">
<ol>
<li style="color:#333;">
<div style="">xGetElementsByClassName<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"adxm"</span>, document, <span style="color: #3366CC;">"ul"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>oUL<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#26536A;">
<div style="">	xGetElementsByClassName<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"submenu"</span>, oUL, <span style="color: #3366CC;">"li"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>oLI<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#333;">
<div style="">&nbsp;</div>
</li>
<li style="color:#26536A;">
<div style="">		oLI.<span style="color: #006600;">onmouseover</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#333;">
<div style="">			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">UL</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="color:#26536A;">
<div style="">				<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">UL</span> = oLI.<span style="color: #006600;">getElementsByTagName</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"ul"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="color:#333;">
<div style="">			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">UL</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">visibility</span> = <span style="color: #3366CC;">"visible"</span>;</div>
</li>
<li style="color:#26536A;">
<div style="">		<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="color:#333;">
<div style="">&nbsp;</div>
</li>
<li style="color:#26536A;">
<div style="">		oLI.<span style="color: #006600;">onmouseout</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="color:#333;">
<div style="">			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">UL</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">visibility</span> = <span style="color: #3366CC;">"hidden"</span>;</div>
</li>
<li style="color:#26536A;">
<div style="">		<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="color:#333;">
<div style="">&nbsp;</div>
</li>
<li style="color:#26536A;">
<div style="">	<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="color:#333;">
<div style=""><span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</pre>
</div>
</div>
<p></p>
<p class="update">
And this works near instant.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/end-of-the-road/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Small update</title>
		<link>http://aplus.rs/adxmenudev/small-update/</link>
		<comments>http://aplus.rs/adxmenudev/small-update/#comments</comments>
		<pubDate>Mon, 21 Feb 2005 19:58:29 +0000</pubDate>
		<dc:creator>Aleksandar</dc:creator>
				<category><![CDATA[ADxMenu]]></category>

		<guid isPermaLink="false">http://www.aplus.co.yu/?p=128</guid>
		<description><![CDATA[I was often asked to create an example of the menu with horizontal submenus, so here is one.]]></description>
			<content:encoded><![CDATA[<p>
I have updated the <a href="/adxmenu/examples/">example listing</a> with an example of menu with <a href="/adxmenu/examples/netymology-hs/">horizontal submenus</a>. This was asked several times and I got time to do it last week while staying at home, recovering from the flu (or some similar thing).
</p>
<p>
During development, I accidentally found the problem in IE, with .htc. If you have some <code>:hover</code> rule which is empty, IE will throw <i>“invalid pointer”</i> error. I updated all .htc files to fix this — they are all now in .21 version.</p>
]]></content:encoded>
			<wfw:commentRss>http://aplus.rs/adxmenudev/small-update/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)

Served from: aplus.rs @ 2012-02-04 18:39:09 -->
