<?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>onlinecasinodemar.com &#187; superfish</title>
	<atom:link href="http://www.onlinecasinodemar.com/tag/superfish/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onlinecasinodemar.com</link>
	<description>WordPress Themes &#38; Webdesign</description>
	<lastBuildDate>Wed, 05 Oct 2011 13:04:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<meta name="generator" content="webdemar 3.0" />
		<item>
		<title>Tutorial: jQuery Dropdown Men&#252; mit Superfish</title>
		<link>http://www.onlinecasinodemar.com/webdesign/tutorial-jquery-dropdown-menue-mit-superfish/</link>
		<comments>http://www.onlinecasinodemar.com/webdesign/tutorial-jquery-dropdown-menue-mit-superfish/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 11:57:30 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[dropdown menu]]></category>
		<category><![CDATA[superfish]]></category>

		<guid isPermaLink="false">http://www.onlinecasinodemar.com/?p=625</guid>
		<description><![CDATA[<img width="280" height="210" src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/02/superfish-jquery-dropdown.jpg" class="attachment-post-thumbnail wp-post-image" alt="superfish-jquery-dropdown" title="superfish-jquery-dropdown" />Das f&#252;r mich beste Skript, um dynamische Dropdown-Men&#252;s zu erzeugen, ist das jQuery-Plugin von Joel Birch. Durch zahlreiche Parameter k&#246;nnen wir uns das Multi-Level-Men&#252; mit Leichtigkeit in Aussehen und Funktion unseren Anforderungen anpassen. Die Einbindung ist keineswegs schwer. Auch auf diesem Blog habe ich das Superfish Dropdown-Men&#252; von Joel Birch erfolgreich im Einsatz. Das Men&#252; [...]]]></description>
			<content:encoded><![CDATA[<img width="280" height="210" src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/02/superfish-jquery-dropdown.jpg" class="attachment-post-thumbnail wp-post-image" alt="superfish-jquery-dropdown" title="superfish-jquery-dropdown" /><p>Das f&#252;r mich beste Skript, um dynamische Dropdown-Men&#252;s zu erzeugen, ist das jQuery-Plugin von Joel Birch. Durch zahlreiche Parameter k&#246;nnen wir uns das Multi-Level-Men&#252; mit Leichtigkeit in Aussehen und Funktion unseren Anforderungen anpassen. Die Einbindung ist keineswegs schwer.<span id="more-625"></span></p>
<p>Auch auf diesem Blog habe ich das <a href="http://users.tpg.com.au/j_birch/plugins/superfish/">Superfish Dropdown-Men&#252; von Joel Birch</a> erfolgreich im Einsatz. Das Men&#252; ist beliebig erweiterbar, es k&#246;nnen also unendlich viele Unterebenen dargestellt werden.</p>
<p class="alert"><strong>IE Problems?</strong><br /><a href="http://webdemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/">Superfish jQuery Menu IE z-index Bug</a> (English)</p>
<h3>Einbindung von Superfish in eine Website:</h3>
<ul>
<li>Herunterladen des Skriptes &#8211; <a href="http://users.tpg.com.au/j_birch/plugins/superfish/#download">Superfish</a></li>
<li>Einbinden des Stylesheets und des Javascript-Aufrufes in den Head-Bereich der Website</li>
<li>Aufrufen der Superfish-Funktion im Head-Bereich der Website</li>
</ul>
<pre><code>&lt;link rel='stylesheet' type='text/css' media='screen' href='superfish.css' /&gt;
&lt;script type='text/javascript' src='superfish.js'&gt;&lt;/script&gt;</code></pre>
<p><em>Bemerkung:</em><br />
Im Head-Bereich unserer Website binden wir das Stylesheet ein und rufen das Superfish-Javascript auf. <strong>Bitte beachten!</strong> Der Pfad muss m&#246;glicherweise angepasst werden. In obigem Beispiel gehen wir davon aus, dass das Website-Dokument, das Stylesheet und das Javascript auf einer Ordnerebene liegen.</p>
<pre><code>&lt;script type='text/javascript'&gt;
    $(document).ready(function() {
        $('ul.sf-menu').superfish();
    });
&lt;/script&gt;</code></pre>
<p><em>Bemerkung:</em><br />
Ebenso im Head-Bereich unseres Dokuments rufen wir nun die Superfish-Funktion mittels Javascript auf. Hierbei wird gesagt, dass das Superfish-Men&#252; auf eine ungeordnete Liste <em>ul</em> mit der Klasse <em>.sf-menu</em> angewendet werden soll.</p>
<h3>Anpassen der Men&#252;-Parameter:</h3>
<p>Wie schon angesprochen, l&#228;sst uns Joel Birch bei dem Aufruf der Superfish-Funktion zahlreiche Optionen die Funktionsweise des Dropdown-Men&#252;s zu beeinflussen.</p>
<p>Folgende Parameter stehen uns zur Verf&#252;gung:</p>
<pre><code>$.fn.superfish.defaults = {
    hoverClass:    'sfHover',          // the class applied to hovered list items
    pathClass:     'overideThisToUse', // the class you have applied to list items that lead to the current page
    pathLevels:    1,                  // the number of levels of submenus that remain open or are restored using pathClass
    delay:         800,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing
    animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method
    speed:         'normal',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method
    autoArrows:    true,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance
    dropShadows:   true,               // completely disable drop shadows by setting this to false
    disableHI:     false,              // set to true to disable hoverIntent detection
    onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul
    onBeforeShow:  function(){},       // callback function fires just before reveal animation begins – 'this' is the ul about to open
    onShow:        function(){},       // callback function fires once reveal animation completed – 'this' is the opened ul
    onHide:        function(){}        // callback function fires after a sub-menu has closed – 'this' is the ul that just closed
};</code></pre>
<p>Der Aufruf der Superfish-Funktion im Head-Bereich l&#228;sst sich nun beispielsweise wie folgt erweitern:</p>
<pre><code>&lt;script type='text/javascript'&gt; 

    $(document).ready(function() {
        $('ul.sf-menu').superfish({
            delay:       1000,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'fast',                          // faster animation speed
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
        });
    }); 

&lt;/script&gt;</code></pre>
<p><em>Bemerkung:</em><br />
Mit diesen Parametern bestimmen wir also, dass das Dropdown eine Sekunde nach Mouseout ausgeblendet, eine leichte Einblendung &#252;ber Transparenz und ein Slide-Down-Effekt mit schneller Geschwindigkeit haben soll. Au&#223;erdem werden keine Pfeile (wenn Unterpunkte vorhanden) angezeigt und kein Men&#252;schatten erzeugt. Ihr seht bereits, was alles mit diesem Skript m&#246;glich ist.</p>
<h3>Verschiedene Arten des Superfish-Men&#252;s:</h3>
<p>Neben den Optionen f&#252;r Animationen und Geschwindigkeiten gibt es verschiedene Arten des Dropdown-Men&#252;s.</p>
<p><strong>1. Basic Style &#8211; horizontales Men&#252; mit Dropdowns:</strong></p>
<div id="attachment_636" class="wp-caption aligncenter" style="width: 560px"><img src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/01/superfish-horizontal.jpg" alt="horizontale Men&#252;leiste mit Dropdowns" title="horizontale Men&#252;leiste mit Dropdowns" width="550" height="200" class="size-full wp-image-636" /><p class="wp-caption-text">horizontale Men&#252;leiste mit Dropdowns</p></div>
<p>Wie der Name schon sagt, ist der Basic Style die einfachste Form des Superfish-Men&#252;s.</p>
<p><strong>2. Vertical Style &#8211; vertikales Men&#252; mit Dropdowns zur Seite:</strong></p>
<div id="attachment_638" class="wp-caption aligncenter" style="width: 560px"><img src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/01/superfish-vertikal.jpg" alt="vertikales Men&#252; mit Dropdowns zur Seite" title="vertikales Men&#252; mit Dropdowns zur Seite" width="550" height="200" class="size-full wp-image-638" /><p class="wp-caption-text">vertikales Men&#252; mit Dropdowns zur Seite</p></div>
<p>Um ein vertikales Men&#252; anzuzeigen, brauchen wir lediglich ein zus&#228;tzliches Stylesheet einbinden und der ungeordneten Liste <em>ul</em> unseres Men&#252;s mit der Klassen <em>.sf-menu</em> eine weitere Klasse <em>.sf-vertical</em> hinzuf&#252;gen:</p>
<pre><code>&lt;link rel='stylesheet' type='text/css' media='screen' href='superfish.css' /&gt;
&lt;link rel='stylesheet' type='text/css' media='screen' href='superfish-vertical.css' /&gt;</code></pre>
<pre><code>&lt;ul id='menu' class='sf-menu sf-vertical'&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p><strong>3. Nav-bar Style &#8211; doppelte Men&#252;leiste mit Dropdowns:</strong></p>
<div id="attachment_639" class="wp-caption aligncenter" style="width: 560px"><img src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/01/superfish-navbar.jpg" alt="doppelte Men&#252;leiste mit Dropdowns" title="doppelte Men&#252;leiste mit Dropdowns" width="550" height="200" class="size-full wp-image-639" /><p class="wp-caption-text">doppelte Men&#252;leiste mit Dropdowns</p></div>
<p>Der Nav-bar Style ist ebenfalls sehr interessant. Er bietet eine doppelte Men&#252;leiste, bei der ab der dritten Ebene Dropdowns angezeigt werden. Ebenfalls wird der Pfad zur aktuellen Seite im Men&#252; wiedergegeben.</p>
<p>Auch hier muss nur das entsprechende zus&#228;tzliche Stylesheet eingebunden werden und die weitere Klasse <em>.sf-navbar</em> an die Liste weitergegeben werden.</p>
<pre><code>&lt;link rel='stylesheet' type='text/css' media='screen' href='superfish.css' /&gt;
&lt;link rel='stylesheet' type='text/css' media='screen' href='superfish-navbar.css' /&gt;</code></pre>
<pre><code>&lt;ul id='menu' class='sf-menu sf-navbar'&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;

            &lt;li&gt;&lt;a href='#'&gt;Submenu Item&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#'&gt;Menu Item&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p><strong>4. with Supersubs &#8211; Dropdown-Men&#252; mit extralangen Unterpunkten:</strong></p>
<div id="attachment_640" class="wp-caption aligncenter" style="width: 560px"><img src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/01/superfish-supersubs.jpg" alt="Dropdown-Men&#252; mit extralangen Unterpunkten" title="Dropdown-Men&#252; mit extralangen Unterpunkten" width="550" height="200" class="size-full wp-image-640" /><p class="wp-caption-text">Dropdown-Men&#252; mit extralangen Unterpunkten</p></div>
<p>Die Option Supersubs bietet die M&#246;glichkeit dynamisch auf besonders lange Unterpunkte zu reagieren, um Zeilenumbr&#252;che im Men&#252; zu vermeiden.</p>
<p>Um Supersubs einzubinden, m&#252;ssen wir ein zus&#228;tzliches Javascript integrieren und den Aufruf der Superfish-Funktion etwas erweitern.</p>
<pre><code>&lt;script type='text/javascript' src='superfish.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='supersubs.js'&gt;&lt;/script&gt;</code></pre>
<pre><code>&lt;script type='text/javascript'&gt; 

    $(document).ready(function(){
        $('ul.sf-menu').supersubs({
            minWidth:    12,   // minimum width of sub-menus in em units
            maxWidth:    27,   // maximum width of sub-menus in em units
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over
                               // due to slight rounding differences and font-family
        }).superfish();  // call supersubs first, then superfish, so that subs are
                         // not display:none when measuring. Call before initialising
                         // containing tabs for same reason.
    }); 

&lt;/script&gt;</code></pre>
<h3>Formatierung mit CSS:</h3>
<p>Blau ist h&#252;bsch, aber nicht jedermanns Sache und nicht immer zum Rest der Website passend. Die Anpassung des Aussehens &#252;ber CSS ist &#252;bersichtlich gestaltet und kann in folgenden Dateien vorgenommen werden:</p>
<ul>
<li>superfish.css</li>
<li>superfish-vertical.css (bei Vertical Stlye)</li>
<li>superfish-navbar.css (bei Nav-bar Stlye)</li>
</ul>
<h3>Support:</h3>
<p>Sollte man Probleme mit der Einbindung und Anwendung von Superfish haben, kann man sich in die <a href="http://groups.google.com/group/jquery-en/">jQuery Mailing List</a> eintragen und sein Anliegen dort kundtun.</p>
<p>Sowie Joel etwas Zeit hat, hilft er pers&#246;nlich weiter, ansonsten tummeln sich dort auch sonstige schlaue jQuery-K&#246;pfe.</p>
<p>Ich selbst hatte letzte Woche ein Problem mit der <a href="http://webdemar.com/wordpress/tutorial-jquery-dropdown-menue-fuer-wordpress/">Einbindung von Superfish in WordPress</a>. Innerhalb eines Tages war das Problem nach einigem Hin- und Her-Gemaile (tolles Wort!) gel&#246;st. </p>
<p><strong>A big big thanks to Joel for awesome support!</strong></p>
<h3>Fazit:</h3>
<p>Das Superfish jQuery-Dropdown-Men&#252; bringt eine unheimliche Vielfalt an Features mit sich. Wenn man sich auch nur ein wenig mit Einbindung von Skripten und XHTML/CSS auskennt, ist die Anwenung dieses Plugins &#252;berhaupt kein Problem und bietet einen beachtlichen Mehrwert f&#252;r eine Website, ein Template oder WordPress-Theme.</p>
<h3>Relevante Links:</h3>
<ul>
<li><a href="http://users.tpg.com.au/j_birch/plugins/superfish">Superfish &#8211; Suckerfish on &#8216;roids</a></li>
<li>Download &#8211; <a href="http://users.tpg.com.au/j_birch/plugins/superfish/#download">Superfish</a></li>
<li>Support in der <a href="http://groups.google.com/group/jquery-en/">jQuery Mailing List</a></li>
<li><a href="http://webdemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/">Superfish jQuery Menu IE z-index Bug</a> (English)</li>
<li><a href="http://webdemar.com/wordpress/tutorial-jquery-dropdown-menue-fuer-wordpress/">Tutorial: jQuery Dropdown Men&#252; f&#252;r WordPress</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.onlinecasinodemar.com/webdesign/tutorial-jquery-dropdown-menue-mit-superfish/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>Superfish jQuery Menu IE z-index Bug</title>
		<link>http://www.onlinecasinodemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/</link>
		<comments>http://www.onlinecasinodemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 15:27:32 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[dropdown menu]]></category>
		<category><![CDATA[ie bug]]></category>
		<category><![CDATA[superfish]]></category>

		<guid isPermaLink="false">http://www.onlinecasinodemar.com/?p=216</guid>
		<description><![CDATA[<img width="280" height="210" src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/02/superfish-jquery-dropdown.jpg" class="attachment-post-thumbnail wp-post-image" alt="superfish-jquery-dropdown" title="superfish-jquery-dropdown" />As a good and stable dropdown menu I&#8217;m using the Superfish jQuery menu plugin by Joel Birch. Superfish is an enhanced Suckerfish-style menu jQuery plugin that is quite easy to customize. With a lot of options it can be tailored to your needs. But thanks to our friend IE you might experience the z-index bug. [...]]]></description>
			<content:encoded><![CDATA[<img width="280" height="210" src="http://www.onlinecasinodemar.com/wp-content/uploads/2009/02/superfish-jquery-dropdown.jpg" class="attachment-post-thumbnail wp-post-image" alt="superfish-jquery-dropdown" title="superfish-jquery-dropdown" /><p>As a good and stable dropdown menu I&#8217;m using the <a href="http://users.tpg.com.au/j_birch/plugins/superfish">Superfish jQuery menu plugin by Joel Birch</a>. Superfish is an enhanced Suckerfish-style menu jQuery plugin that is quite easy to customize. With a lot of options it can be tailored to your needs. But thanks to our friend IE you might experience the z-index bug. The fix is very simple!<span id="more-216"></span></p>
<h3 class="clear">The IE z-index issue:</h3>
<p>I really like this dropdown menu and in Firefox (as almost always) everything worked properly. But then I tested in IE. The source code was similar to this</p>
<pre><code>&lt;div id='header'&gt;
    &lt;div id='nav' class='sf-menu'&gt;Here the menu&lt;/div&gt;
&lt;/div&gt;
&lt;div id='content'&gt;Here the content&lt;/div&gt;</code></pre>
<p>Both the header and the content div have <em>position:relative</em>. In IE the dropdown menu was displayed under the content div so the links in the dropdown were not clickable though the z-index of the menu list was set to 100. </p>
<h3>The fix is so simpel:</h3>
<p>After a bit of research I came accross the <a href="http://verens.com/archives/2005/07/15/ie-z-index-bug">IE z-index Bug on Klog &#8211; php, linux, ajax, javascript</a>. On this page Kae Verens describes the bug and gives an example. But the solution was some kind of unsatisfactory for me. But one of the commenters &#8211; Michael &#8211; posted a very <a href="http://verens.com/2005/07/15/ie-z-index-bug/comment-page-1/#comment-309">simple solution</a>.</p>
<p>You do not have to set the z-index on the menu or its children but on the two position:relative elements <em>header</em> and <em>content</em> (in my example). So I set:</p>
<pre><code>#header {
    z-index:2;
}
#content {
    z-index:1;
}</code></pre>
<p>and the problem was fixed! Thanks to Michael. This is basic CSS knowledge, but once you dived into the menu&#8217;s css it is hard to see <img src='http://www.onlinecasinodemar.com/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </p>
<h3>Relevant Links:</h3>
<ul>
<li><a href="http://users.tpg.com.au/j_birch/plugins/superfish">Superfish &#8211; Suckerfish on &#8216;roids</a></li>
<li>Download &#8211; <a href="http://users.tpg.com.au/j_birch/plugins/superfish/#download">Superfish</a></li>
<li>Support &#8211; <a href="http://groups.google.com/group/jquery-en/">jQuery Mailing List</a></li>
<li><a href="http://webdemar.com/webdesign/tutorial-jquery-dropdown-menue-mit-superfish/">Tutorial: jQuery Dropdown Men&#252; mit Superfish</a> (German)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.onlinecasinodemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/feed/</wfw:commentRss>
		<slash:comments>162</slash:comments>
		</item>
	</channel>
</rss>

