<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Adding additional behaviour to IE - LI Hover/Rollover</title>
	<link>http://www.melbournechapter.net/wordpress/programming-languages/cman/2006/03/27/adding-additional-behaviour-to-ie-li-hover/</link>
	<description>web application development with popular technologies</description>
	<pubDate>Tue, 02 Dec 2008 07:07:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Richard Lee</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/cman/2006/03/27/adding-additional-behaviour-to-ie-li-hover/#comment-30</link>
		<pubDate>Mon, 27 Mar 2006 06:35:20 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/cman/2006/03/27/adding-additional-behaviour-to-ie-li-hover/#comment-30</guid>
					<description>htc is a great, but please note it is by no means standards compliant. A simple alternative is to use javascript to filter through the list and apply mouseover and mouseout events to the individual list items. Obviously this will require a javascript enabled browser. Below is an example of such a javascript used in &lt;a title="Take me to the Suckerfish Menu!" href="http://www.htmldog.com/articles/suckerfish/dropdowns/"&gt;Dan Webb and Patrick Griffith's Suckerfish menu&lt;/a&gt;.

sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

NB: Although IE has troubles with the hover behaviour most modern browsers such as Mozilla, Opera and Safari support :hover, :active and :focus on lists - as the standards intended.</description>
		<content:encoded><![CDATA[<p>htc is a great, but please note it is by no means standards compliant. A simple alternative is to use javascript to filter through the list and apply mouseover and mouseout events to the individual list items. Obviously this will require a javascript enabled browser. Below is an example of such a javascript used in <a title="Take me to the Suckerfish Menu!" href="http://www.htmldog.com/articles/suckerfish/dropdowns/">Dan Webb and Patrick Griffith&#8217;s Suckerfish menu</a>.</p>
<p>sfHover = function() {<br />
var sfEls = document.getElementById(&#8221;nav&#8221;).getElementsByTagName(&#8221;LI&#8221;);<br />
for (var i=0; i<br />
sfEls[i].onmouseover=function() {<br />
this.className+=&#8221; sfhover&#8221;;<br />
}<br />
sfEls[i].onmouseout=function() {<br />
this.className=this.className.replace(new RegExp(&#8221; sfhover\\b&#8221;), &#8220;&#8221;);<br />
}<br />
}<br />
}<br />
if (window.attachEvent) window.attachEvent(&#8221;onload&#8221;, sfHover);</p>
<p>NB: Although IE has troubles with the hover behaviour most modern browsers such as Mozilla, Opera and Safari support :hover, :active and :focus on lists - as the standards intended.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
