<?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>Timo Körber Webblog &#187; jQuery</title>
	<atom:link href="http://www.timokoerber.de/blog/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timokoerber.de/blog</link>
	<description></description>
	<lastBuildDate>Wed, 18 Nov 2009 20:33:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Animiertes Thumbnail-Menü mit jQuery</title>
		<link>http://www.timokoerber.de/blog/jquery/animiertes-thumbnail-menu-mit-jquery/</link>
		<comments>http://www.timokoerber.de/blog/jquery/animiertes-thumbnail-menu-mit-jquery/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 18:22:33 +0000</pubDate>
		<dc:creator>Timo Körber</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Menü]]></category>
		<category><![CDATA[Thumbnail]]></category>

		<guid isPermaLink="false">http://www.timokoerber.de/blog/?p=105</guid>
		<description><![CDATA[In diesem Artikel werd ich euch zeigen, wie man mit ein wenig jQuery ein animiertes Thumbnail-Menü erstellt.]]></description>
			<content:encoded><![CDATA[<p>In diesem Artikel werd ich euch zeigen, wie man mit ein wenig jQuery ein animiertes Thumbnail-Menü erstellt.  Das Ergebnis wird anschließend wie folgt aussehen:</p>
<p><span id="more-105"></span></p>
<p style="text-align: center;"><a title="Animiertes Thumbnail-Menü mit jQuery" href="http://www.timokoerber.de/showroom/thumbnail_menu/" target="_blank"><img class="aligncenter" title="Animiertes Thumbnail-Menü mit jQuery" src="http://www.timokoerber.de/showroom/thumbnail_menu/animiertes_menu_mit_jquery.jpg" alt="Animiertes Menü mit jQuery" width="428" height="133" /></a></p>
<p>Wir fangen mit der HTML-Struktur unseres Menüs an. Es besteht ausschließlich aus zwei Div-Containern, sowie  den Links, die jeweils das entsprechende Thumbnail enthalten.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menuitem&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image1.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menuitem&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image2.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menuitem&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image3.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menuitem&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image4.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Mit folgendem CSS wird das ganze in die richtige Form gebracht.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">130px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#menu</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>  <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#menu</span> a img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#menu</span> <span style="color: #6666ff;">.menuitem</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#menu</span> img <span style="color: #00AA00;">&#123;</span> -ms-interpolation-mode<span style="color: #00AA00;">:</span> bicubic<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Zu beachten ist ist dabei, dass der Container die Höhe der Bilder haben sollte (<em> height: 130px; </em>), und außerdem <em>position: relative</em> haben sollte, um das Menü am Fuß des Containers ausrichten zu können ( <em>bottom: 0px;</em> ). Die letzte Zeile sorgt mit <em>-ms-interpolation-mode<span style="color: #00aa00;">:</span> bicubic; </em>für eine gescheite Darstellung im IE.</p>
<p>Nun zur jQuery Magie. Mit folgendem Code setzen wir nach der Definition der wichtigen Variablen alle Bilder auf die kleine Thumbnail-Größe, und setzen die entsprechenden Befehle für MouseOver und MouseOut.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #003366; font-weight: bold;">var</span> imageWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">130</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Breite für großen Thumbail</span>
   <span style="color: #003366; font-weight: bold;">var</span> thumbWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">80</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// Breite für kleinen Thumbail</span>
   <span style="color: #003366; font-weight: bold;">var</span> speed <span style="color: #339933;">=</span> <span style="color: #CC0000;">150</span><span style="color: #339933;">;</span>      <span style="color: #006600; font-style: italic;">// Animations-Geschwindigkeit</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// Bilder auf Thumbnail-Größe setzen</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu .menuitem img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> thumbWidth<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu .menuitem'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mouseover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #006600; font-style: italic;">// MouseOver - Thumbanil vergrößern</span>
         thumbnail <span style="color: #339933;">=</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         thumbnail.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> imageWidth<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> speed<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mouseout</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #006600; font-style: italic;">// MouseOver - Thumbanil verkleinern</span>
         thumbnail.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> thumbWidth<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> speed<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Dabei ist der Aufruf der Methode stop() sehr wichtig, da sonst nach einem verfrühten MouseOut die Animation erst zu Ende läuft, bevor die nächste gestartet wird. Besonders bei einer langsamen Animation bewirkt dies einen schwammigen Effekt&#8230; und das will keiner <img src='http://www.timokoerber.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Und fertig ist unser animiertes Thumbnail-Menü. Wieder einmal ein gutes Beispiel für die Einfachheit von jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timokoerber.de/blog/jquery/animiertes-thumbnail-menu-mit-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tiefer Einblick in jQuery von Ben Nadel</title>
		<link>http://www.timokoerber.de/blog/jquery/tiefer-einblick-in-jquery-von-ben-nadel/</link>
		<comments>http://www.timokoerber.de/blog/jquery/tiefer-einblick-in-jquery-von-ben-nadel/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 14:03:01 +0000</pubDate>
		<dc:creator>Timo Körber</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ben]]></category>
		<category><![CDATA[bibliothek]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[nadel]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.timokoerber.de/blog/?p=43</guid>
		<description><![CDATA[In diesem Video gibt er in Form einer Präsentation einen intensiven Einblick in jQuery und all seine Komponenten. Zwar geht er nur kurz auf die einzelnen Bestandteile ein, zeigt jedoch anhand kleiner Beispiele den Zweck und die Funktion und schafft es damit ca. 100 Minuten Videomaterial zu füllen. Sehr empfehlenswert für jQuery Begeisterte und diejenigen, die es werden wollen]]></description>
			<content:encoded><![CDATA[<p>jQuery ist eine mächtige und ebenso umfangreiche Javascript Bibliothek. Bisher habe ich mir über verschiedene kleine Tutorials ein paar jQuery Techniken angegeignet, um mir einen Überblick über die Bibliothek zu verschaffen. Begeistert war ich von Anfang, kam jedoch nicht dazu mir für jede Komponente von jQuery ein entsprechendes Tutorial rein zu fahren. Dies ist rückblickend sehr schade gewesen, da mir dadurch die eigentlich Mächtigkeit von jQuery verborgen blieb. <span id="more-43"></span></p>
<p>Nun stieß ich auf der Suche nach Tutorials auf folgendes Video von Chief Web Developer Ben Nadel.  In diesem Video gibt er in Form einer Präsentation einen intensiven Einblick in jQuery und all seine Komponenten. Zwar geht er nur kurz auf die einzelnen Bestandteile ein, zeigt jedoch anhand kleiner Beispiele den Zweck und die Funktion und schafft es damit ca. 100 Minuten Videomaterial zu füllen. Sehr empfehlenswert für jQuery Begeisterte und diejenigen, die es werden wollen.</p>
<p><a href="http://www.bennadel.com/blog/1492-An-Intensive-Exploration-Of-jQuery-With-Ben-Nadel.htm">Zum Video &#8220;An Intensive Exploration Of jQuery With Ben Nadel&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.timokoerber.de/blog/jquery/tiefer-einblick-in-jquery-von-ben-nadel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

