<?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>Punkt . 16 &#187; Tutorial</title>
	<atom:link href="http://www.punkt16.de/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.punkt16.de</link>
	<description>Entwicklung, Design &#38; Mehr</description>
	<lastBuildDate>Wed, 07 Apr 2010 13:58:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Kalender 1.1.1</title>
		<link>http://www.punkt16.de/php/php-kalender-1-1/</link>
		<comments>http://www.punkt16.de/php/php-kalender-1-1/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 15:29:32 +0000</pubDate>
		<dc:creator>Palme Florian</dc:creator>
				<category><![CDATA[Klassen]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=250</guid>
		<description><![CDATA[Version 1.1.1 des Punkt . 16 PHP Kalender! [ <a href="http://www.punkt16.de/php-kalender-1-1" target="_blank" title="PHP Kalender 1.1.1">Mehr erfahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>Version 1.1.1 des Punkt . 16 PHP Kalender!</p>
<p><span id="more-250"></span></p>
<p>Mit der neuen Version des Kalenders, erweitert sich der Funktionsumfang um Feiertage &#038; Ferien.</p>
<p>&nbsp;</p>
<p>Als Beispiel fügen wir Silvester dieses Jahres hinzu. Da Silvester jedes Jahr statt findet, verwenden wir für die Jahreszahl ein Sternchen ( * ). Diese Sternchen könnt ihr Nutzen wie Ihr möchtet, d.h. auch für Tage und Monate.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Silvester'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'31.12.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Oder habt Ihr vllt an jedem 5. Tag im Monat ein Fest?</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Monats-Party'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'05.*.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p><b>Schon gewusst?</b><br />
Ihr könnt noch zwei Paramter bei &#8220;addHoliday&#8221; übergeben:<br />
Eine URL, welche beim Klick auf den Eintrag auf eine Seite weiterleitet<br />
Eine CSS-Klasse, welche dieser Tag bekommen soll!</p>
<p>So könnt Ihr z.B. Weihnachten (welches schon fest hinterlegt ist <img src='http://www.punkt16.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) schön hinterlegen</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Weihnachten'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'24.12.*'</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'http://deineseite.de/weihnachten.html'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'weihnachten'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Der 24.12. wird zu http://deineseite.de/weihnachten.html verlinkt und bekommt die Klasse &#8220;weihnachten&#8221;, welche diesen Tag vielleicht rot hinterlegt? <img src='http://www.punkt16.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>Möchtet Ihr einen eingetragenen Feiertag wieder löschen, wie zum Beispiel &#8220;Heilige drei Könige&#8221; (fest Eingetragen), verwendet Ihr folgende Funktion:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">removeHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'06.1.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>So werden genau die Feiertage ausgetragen, welche am 06.1.* stattfinden.</p>
<p>&nbsp;</p>
<p>Weiter habt ihr die Möglichkeit, ganze Ferien einzutragen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addVacation</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'26.12.2009'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'29.12.2009'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Testferien'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Das erste Datum ist der Beginn, das zweite Datum das Ende (wird markiert). Der Dritte Parameter &#8220;Testferien&#8221; ist der Name dieser Ferien.<br />
Hier könnt Ihr auch, wie oben, zwei weitere Parameter anhängen, welche eine URL und eine CSS-Klasse behinhalten.</p>
<p>&nbsp;</p>
<p>Ferien könnt ihr löschen, in dem Ihr beim Funktionsaufruf von removeVacation den Namen dieser Ferien übergebt:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">removeVacation</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Testferien'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Ein kompletter Code könnt nun so aussehen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$deutscheDaten</span><span style="color: #339933;">=</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'daysLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Montag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dienstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mittwoch'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Donnerstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Freitag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Samstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sonntag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'daysShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mo'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Di'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mi'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Do'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Fr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sa'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'So'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Januar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Februar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'April'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'August'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'September'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Oktober'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'November'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dezember'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jan'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Feb'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Apr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Aug'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sep'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Okt'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Nov'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dez'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Punkt16_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$deutscheDaten</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Silvester'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'31.12.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Monats-Party'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'05.*.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">removeHoliday</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'06.1.*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addVacation</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'26.12.2009'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'29.12.2009'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Testferien'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">removeVacation</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Testferien'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Ein Beispiel mit den neuen Funktionen könnt ihr euch hier ansehen: <a href="http://examples.punkt16.de/PHP/Kalender1.1.1/" target="_blank" title="PHP Kalender 1.1 Beispiel">http://examples.punkt16.de/PHP/Kalender1.1.1/</a><br />
Die benötigten Dateien könnt Ihr euch <a href="http://downloads.punkt16.de/download.php?file=/PHP/Punkt16_PHP_Calendar_1_1_1.zip" title="PHP Kalender 1.1.1 Files">hier downloaden</a>!</p>
<p>&nbsp;</p>
<p><b>Ein Backlink zu www.punkt16.de ist erwünscht, aber nicht Pflicht!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/php/php-kalender-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Kalender</title>
		<link>http://www.punkt16.de/php/php-kalender/</link>
		<comments>http://www.punkt16.de/php/php-kalender/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 23:17:23 +0000</pubDate>
		<dc:creator>Palme Florian</dc:creator>
				<category><![CDATA[Klassen]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=239</guid>
		<description><![CDATA[Ein PHP-basierender Kalender, welcher den aktuellen Tag markiert. [ <a href="http://www.punkt16.de/php/php-kalender/" target="_blank">Mehr erfahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>Ein PHP-basierender Kalender, welcher den aktuellen Tag markiert.</p>
<p><span id="more-239"></span></p>
<p>&nbsp;</p>
<p>Heute gibt es ein Skript für einen PHP-basierenden Kalender! Das Skript selbst erkläre ich nicht, da es den Rahmen mehr als sprengen würde. Allerdings erkläre ich euch, wie einfach es Anzuwenden ist! Die PHP-Klasse, welche ihr benötigt, könnt ihr euch <a href="http://downloads.punkt16.de/download.php?file=/PHP/Punkt16_PHP_Calendar.zip" target="_blank">hier downloaden</a>.</p>
<p>Als ersters solltet Ihr das Skript includen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'calendar.class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Nun müsst Ihr ein neues Objekt instanzieren. Das heisst nichts anderes, als den Kalender aufzurufen und in einer Variable fest zu halten.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Punkt16_Calendar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Jetzt noch die Funktion <span style="color:#2060A0;">getCalendar</span> aufrufen, und mit <span style="color:#2060A0;">echo</span> ausgeben:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>
Der komplette Code für den Standard-Kalender sieht wie folgt aus:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'calendar.class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Punkt16_Calendar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Ihr habt nun aber englische Monats- und Tagesnamen. Um diese zu ändern, müsst Ihr beim instanzieren des Objekts ein Array mit den deutschen Namen übergeben.<br />
Euer Array sieht so aus:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$deutscheDaten</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">'daysLong'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Montag'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Dienstag'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Mittwoch'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Donnerstag'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Freitag'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Samstag'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Sonntag'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">'daysShort'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Mo'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Di'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Mi'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Do'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Fr'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Sa'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'So'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">'monthsLong'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Januar'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Februar'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'April'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'August'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'September'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Oktober'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'November'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Dezember'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">'monthsShort'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Jan'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Feb'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Apr'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Aug'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Sep'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Okt'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Nov'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'Dez'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Falls Ihr euren Code nicht so aufblähen möchtet, hier die kurze Fassung:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$deutscheDaten</span><span style="color: #339933;">=</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'daysLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Montag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dienstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mittwoch'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Donnerstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Freitag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Samstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sonntag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'daysShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mo'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Di'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mi'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Do'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Fr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sa'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'So'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Januar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Februar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'April'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'August'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'September'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Oktober'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'November'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dezember'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jan'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Feb'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Apr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Aug'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sep'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Okt'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Nov'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dez'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Übergebt nun dem Objekt diese Daten:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$kalender</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Punkt16_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$deutscheDaten</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Kompletter Code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'calendar.class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$deutscheDaten</span><span style="color: #339933;">=</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'daysLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Montag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dienstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mittwoch'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Donnerstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Freitag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Samstag'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sonntag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'daysShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mo'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Di'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mi'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Do'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Fr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sa'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'So'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsLong'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Januar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Februar'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'April'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'August'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'September'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Oktober'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'November'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dezember'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'monthsShort'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jan'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Feb'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'März'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Apr'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Mai'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juni'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Juli'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Aug'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Sep'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Okt'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Nov'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Dez'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$kalender</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Punkt16_Calendar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$deutscheDaten</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$kalender</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCalendar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Eure Ausgabe sieht wohl noch etwas sehr weiss aus. Deswegen benötigt Ihr noch eine passende CSS, welche dem Download oben beiliegt:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">table<span style="color: #6666ff;">.calendar</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">210px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#a6c9e2</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span> <span style="color: #993333;">auto</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> broder<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#c5dbec</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#5c9ccc</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: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> td<span style="color: #6666ff;">.monthBackwardA</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> td<span style="color: #6666ff;">.monthBackwardA</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> td<span style="color: #6666ff;">.monthYear</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">14px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> td<span style="color: #6666ff;">.monthForwardA</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> table<span style="color: #6666ff;">.title</span> td<span style="color: #6666ff;">.monthForwardA</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> td<span style="color: #6666ff;">.dayName</span> <span style="color: #00AA00;">&#123;</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;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> td<span style="color: #6666ff;">.dayA</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#c5dbec</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#dfeffc</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#2e6e9e</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: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> td<span style="color: #6666ff;">.dayA</span><span style="color: #6666ff;">.dayTodayA</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fad42e</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fbec88</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#363636</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
table<span style="color: #6666ff;">.calendar</span> td<span style="color: #6666ff;">.dayA</span><span style="color: #6666ff;">.dayOther</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#e6f4ff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f6fbff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#98d3ff</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Ein Beispiel mit deutschen Namen könnt ihr euch hier ansehen: <a href="http://examples.punkt16.de/PHP/Kalender/" target="_blank">http://examples.punkt16.de/PHP/Kalender/</a></p>
<p>&nbsp;</p>
<p><b>Ein Backlink zu www.punkt16.de ist erwünscht, aber nicht Pflicht!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/php/php-kalender/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3 Firefox-Versionen parallel laufen lassen</title>
		<link>http://www.punkt16.de/allgemein/3-firefox-versionen-parallel-laufen-lassen/</link>
		<comments>http://www.punkt16.de/allgemein/3-firefox-versionen-parallel-laufen-lassen/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 20:04:00 +0000</pubDate>
		<dc:creator>Palme Florian</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=181</guid>
		<description><![CDATA[Als Webentwickler muss man die Design-Umsetzung in allen möglichen Browser testen. Bei Firefox muss man sich entscheiden: Version 3.5, 3.0 oder 2.0? Nicht nötig! [ <a href="http://www.punkt16.de/?p=181" target="_blank">Mehr erfahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>Als Webentwickler muss man die Design-Umsetzung in allen möglichen Browser testen. Bei Firefox muss man sich entscheiden: Version 3.5, 3.0 oder 2.0? Nicht nötig!</p>
<p><span id="more-181"></span></p>
<p>&nbsp;</p>
<p>Installiert euch als Hauptbrowser die Version 3.5! Version 3.0 und 2.0 kann man ebenso installieren, <b>ohne</b> 3.5 deinstallieren zu müssen. Wie das geht? Ich zeig es euch!</p>
<p>Als erstes ladet Ihr euch eine Version runter. Ich verwende für diese Tutorial Version 3.0!<br />
Macht einen Rechtsklick auf die Exe-File und entpackt diese. (z.B. mit WinZip).</p>
<p>Kopiert den Inhalt des Ordners <b>localized</b> in den Ordner <b>nonlocalized</b>. Die Dateien <i>removed-files.log</i>, <i>setup.exe</i> und den Ordner <i>optional</i> könnt ihr löschen.</p>
<p>Wenn Ihr möchtet, könnt ihr den Ordner <b>nonlocalized</b> nun an einen beliebigen Ort kopieren, wiech z.B. nach C:\FireFox3_Test\</p>
<p>&nbsp;</p>
<p>Als nächstest müsst ihr den Profil-Manager aufrufen:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">firefox -profilemanager -no-remote</div></td></tr></tbody></table></div>
<p>Klickt auf <b>Profil erstellen&#8230;</b>.</p>
<p>Gebt einen Benutzernamen ein, z.B. <b>FF3Test</b> und geht dann auf <b>Fertigstellen</b>.</p>
<p>Erstellt eine neue Verknüpfung: Wählt den Pfad zur <b>firefox.exe</b> im <b>nonlocalized</b>-Ordner und schreibt, hinter dem Dateipfad, folgende Angabe:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-P FF3Test -no-remote</div></td></tr></tbody></table></div>
<p>In meinem Fall sieht die Textzeile nun folgendermaßen aus:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\FireFox3_Test\nonlocalized\firefox.exe -P FF3Test -no-remote</div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Nun könnt Ihr Firefox 3.0 ohne Probleme aufrufen: parallel zu Firefox 3.5!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/allgemein/3-firefox-versionen-parallel-laufen-lassen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ein DIV-Layout erstellen</title>
		<link>http://www.punkt16.de/code/ein-div-layout-erstellen/</link>
		<comments>http://www.punkt16.de/code/ein-div-layout-erstellen/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 15:24:02 +0000</pubDate>
		<dc:creator>Takeyo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Div]]></category>
		<category><![CDATA[Tabelle]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=140</guid>
		<description><![CDATA[Ein Layout mit DIVs anstatt Tabellen und iFrames? Kein Problem! Mit diesem Tutorial und einer passenden Vorlage lernt ihr ganz schnell wie das geht. [ <a href="http://www.punkt16.de/?p=140">Mehr erfahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>Ein Layout mit DIVs anstatt Tabellen und iFrames?<br />
Kein Problem! Mit diesem Tutorial und einer passenden Vorlage lernt ihr ganz schnell wie das geht.</p>
<p><span id="more-140"></span></p>
<p>&nbsp;</p>
<p>Du möchtest also ein DIV Layout erstellen? Also gut, ich werde dir zeigen wie man eines Macht.<br />
Zu nächsteinmal werde ich dir erklären was ein DIV ist und welche Vorteile ein DIV-Layout gegenüber ein Table-Layout&#8217;s hat.<br />
Ich werde dann Schritt für Schritt erklären wie ich genau <a href="http://takeyo.de/div.html" target="_blank">diese</a> Webseite hier erstellt habe (übrigens, ich habe hierfür nur 20 Minuten gebraucht!)</p>
<p>&nbsp;</p>
<p><strong>Achtung!<br />
Dieses Tutorial bezieht sich auf folgende Vorlage:<br />
</strong><a href="http://takeyo.de/div.html" target="_blank">http://takeyo.de/div.html</a></p>
<p>&nbsp;</p>
<h3>Wieso DIVs?</h3>
<p>Diese Frage musste ich mir am Anfang auch stellen, da ich dachte, dass man mit Tabellen viel besser Layouts aufbauen kann. Tatsächlich denken viele Leute so, doch Tabellen sind nicht für Layoutstrukturierungen gedacht. DIVs sind viel flexibler und man kann leicht ihre Größe ändern oder sie mit Javascript hin und herschieben.<br />
Es wird am Anfang bestimmt schwer von Tabellen und iFrames loszulassen, aber mit DIVs bist du echt im Trend <img src='http://www.punkt16.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Das DIV Objekt</h3>
<p>Ein Div ist eine Art Box. Quadratisch, praktisch, gut! Ein Div wird in HTML so geschrieben:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>Inhalt<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>Zunächst geben wir dem DIV eine ID oder eine Klasse.<br />
<strong>ID:</strong> Eine ID ist ein einmaliges Objekt im Dokument. Man kann nicht mehrere Objekte mit der gleichen ID besetzen.<br />
<strong>Klasse:</strong> Eine Klasse (Class) kann für unendlich viele Objekte im Dokument benutzt werden. Es gibt kein Limit.</p>
<p>&nbsp;</p>
<p>Wir besetzen unser DIV also mit der ID<strong> &#8220;box&#8221;</strong>:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">// Beispiel für eine ID<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<br />
// Beispiel für eine Klasse<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>Bis jetzt hat sich aber noch nichts getan.<br />
Nun müssen wir die ID in dem Stylesheet Bereich mit Eigenschaften belegen.             Der Stylesheet Bereich kommt in den Head Bereich des Dokuments. Das ganze sollte dann so aussehen:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span><br />
<br />
// Beispiel für eine ID<br />
#box { width: 50px; height: 50px; background-color: red; }<br />
<br />
// Beispiel für eine Klasse<br />
.box { width: 50px; height: 50px; background-color: red; }<br />
<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>Unser  DIV sollte nun als roter quadratischer Kasten angezeigt werden.</p>
<p>&nbsp;</p>
<p>Jeder mit Mensch mit Englischkenntnissen versteht was hier passiert ist.<br />
Ich habe dem DIV folgende Eigenschaften Zugeteilt:</p>
<ul>
<li>width: 50px; ← bedeutet, dass das DIV 50px breit ist.</li>
<li>height: 50px; ← bedeutet, dass das DIV 50px hoch ist.</li>
<li>background-color: red; ← bedeutet, dass das DIV eine rote Hintergrundfarbe hat.</li>
</ul>
<p>Man kann ein DIV natürlich noch mit vielen weiteren Eigenschaften bearbeiten.<br />
Nun, du solltest nun wissen was ein DIV ist und wie man es mit Eigenschaften sichtbar macht.</p>
<p>&nbsp;</p>
<h3>Ein Layout erstellen &#8211; Schritt 1</h3>
<p>So, nun da du ungefähr weißt was DIVs sind können wir Anfang diese Webseite hier nachzubauen.<br />
Dieses Layout besitzt einen Header, eine Navigation und einen Content.<br />
Wir müssen nun diese 3 Bereiche als DIVs scheiben:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;divid<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>Meine Homepage<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;divid<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;navi&quot;</span>&gt;</span>Inhalt<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;divid<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span>Inhalt<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>Unglaublich aber war, mehr brauch man nicht für ein DIV Layout.<br />
Nun müssen wir aber diese 3 DIVs natürlich noch in unserem Stylesheet Bereich bearbeiten. Doch bevor das passiert müssen wir erst etwas anderes bearbeiten. Und zwar den Body Tag. Der Body Tag schließt alles sichtbare auf der Webseite ein. Ich habe unsere Seite mal mit folgenden Eigenschaften belegt:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">body <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Breite des Layouts */</span><br />
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Der Wert &quot;auto&quot; platzieren das Layout mittig. Vorraussetzung: width. */</span><br />
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#5d5d5d</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftart */</span><br />
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftgröße */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>Ich habe die einzelnen Eigenschaften mit Kommentaren versehen um ihre Auswirkungen zu beschreiben.<br />
Nun kommt der Header:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">80px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Höhe des Headers */</span><br />
<span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Max. Breite, damit der Header das Layout nicht sprengt. */</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<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: #808080; font-style: italic;">/* Text wird mittig (&quot;center&quot;) platziert. */</span><br />
<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* 20px innerer Abstand vom Rand zum Text */</span><br />
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">24px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftgröße soll 24px betragen. */</span><br />
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schrift soll FETT erscheinen */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>Nun sollte die Seite aus einem grauen Hintergrund und unserem Header bestehen.<br />
Machen wir also weiter mit den anderen DIVs um das Layout zu vervollständigen. Hier kommt die Navigation:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#navi</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Div wird nach links (&quot;left&quot;) ausgerichtet. */</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Breite der Navigation */</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* 3px innerer Abstand vom Rand zum Text */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>Hier kommt jetzt die Eigenschaft &#8220;float&#8221; ins Spiel, welche sehr wichtig ist. Denn DIV&#8217;s haben die Angewohnheit sich untereinander zu Positionieren. Doch wenn wir alle DIVs untereinander machen würden, hätten wir keine Seitennavigation mehr. Also, &#8220;float&#8221; setzt das DIV in die angegebene Position, sodass das folgende DIV anstatt darunter, daneben gesetzt wird. Allerdings muss dieses nachfolgende DIV die gleiche Eigenschaft besitzen, so wie ich es hier beim Content gemacht habe:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Div wird nach links (&quot;left&quot;) ausgerichtet. */</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">668px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Breite des Contents */</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* 3px innerer Abstand vom Rand zum Text */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>So, nun solltest du schon eine Ähnlichkeit zu diesem Layout hier und dem, welches du gemacht hast erkennen.<br />
Allerdings fehlt jetzt noch der Inhalt des Contents und der Navigation, also auf zu Schritt 2!</p>
<p>&nbsp;</p>
<h3>Ein Layout erstellen &#8211; Schritt 2</h3>
<p>So, das Grundgerüst steht. Nun kümmern wir uns um den Inhalt.             Angefangen im Content. Wir machen nun eine Überschrift, ebenfalls als DIV.<br />
Wir schreiben also nun in das Content DIV folgendes:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titel&quot;</span>&gt;</span>Titel<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>Dieses DIV unterscheidet sich ein wenig von den anderen. Es hat anstatt einer ID eine Klasse. Wieso? Weil wir davon ausgehen, dass diese Titel mehrmals in einem Dokument vorkommen werden. Nun müssen wir es auch dementsprechend in dem Stylesheet Bereich bearbeiten:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;/span<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #6666ff;">.titel</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* Breite des DIVs (&quot;100%&quot; = automatische max. Breite) */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">17px</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* Höhe des DIVs */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#069</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* Schriftfarbe */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<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>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* Textausrichtung (&quot;center&quot; = mittig)*/</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* 3px innerer Abstand zum Rand */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>&lt;em<span style="color: #00AA00;">&gt;</span><span style="color: #808080; font-style: italic;">/* 10px äußerer Abstand zum Rand */</span>&lt;/em<span style="color: #00AA00;">&gt;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>Diesen DIV kannst du immer dann einsetzen, wenn du einen neuen Titel brauchst.<br />
Nun kommen wir zu der Navigation, hier kommen etwas mehr Eigenschaften auf uns zu.<br />
Als erstes füllen wir unsere Navigation mit einem Titel und ein paar Links. Das kann dann so aussehen:</p>
<p><div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;navi&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titel&quot;</span>&gt;</span>Navigation<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Link<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Link<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Link<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
</p>
<p>So und nun kommen wir zu dem Stylesheet Bereich. Die Links in dem Navi DIV werden so angesprochen:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#navi</span> a <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Link wird nicht unterstrichen */</span><br />
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Setzt alle Links untereinander */</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#DDD</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">116px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Breite des Links */</span><br />
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* 3px äußerer Abstand zum Rand */</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* 3px innerer Abstand zum Rand */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>Nun sollten die Links in der Navigation aussehen wie in diesem Layout hier.<br />
Doch wir müssen noch zwei kleine extras zu den Links einbauen.<br />
Extra nr.1 ist ein &#8220;Hover&#8221;-Effekt, der erscheint, wenn man mit der Maus über einen Link fährt.<br />
Und das machen wir so im Stylesheet Bereich:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#navi</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#CCC</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Hintergrundfarbe */</span><br />
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftfarbe */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>So und jetzt noch als letztes eine Einstellung, die bereits besuchte Links nicht Lila verfärbt:</p>
<p><div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#navi</span> a<span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Schriftfarbe */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>So, nun ist alles Fertig!!</p>
<p>Du hast nun ein komplettes Layout aus DIVs erstellt und kannst es jetzt noch weiter bearbeiten.<br />
Wenn du sehen willst, wie ich die DIVs mit dem HTML Code gemacht habe oder den Footer am unteren Rand, schau einfach im Quelltext.</p>
<p>Du kannst dieses Layout weiterhin verwenden wenn du magst.</p>
<p>&nbsp;</p>
<p>Liebe Grüße Take!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/code/ein-div-layout-erstellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Einführung II</title>
		<link>http://www.punkt16.de/jquery/jquery-einfuhrung-ii/</link>
		<comments>http://www.punkt16.de/jquery/jquery-einfuhrung-ii/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 14:07:01 +0000</pubDate>
		<dc:creator>Palme Florian</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=79</guid>
		<description><![CDATA[Weiter gehts mit einer weiteren Einführung in das machtvolle jQuery-Framework! [ <a href="http://www.punkt16.de/?p=79" target="_blank">Mehr efahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>Weiter gehts mit einer weiteren Einführung in das machtvolle jQuery-Framework!</p>
<p><span id="more-79"></span></p>
<p>Wir möchten heute die Funktionen vom letzten mal ein bisschen vereinfachen. Es gibt in jQuery einen Interaction-Helper, der sich &#8220;<b>toggle</b>&#8221; nennt. In diesen Helperkann man beliebig viele Funktionen packen, welche nacheinander ausgeführt werden.</p>
<p>&nbsp;</p>
<p>Wir hängen die toggle-Funktion an den Selector der vorherigen Einführung an.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p><b>toggle</b> ist, dem Event nach, <i>click</i> gleich zu stellen &#8211; d.h., Funktionen in toggle, werden bei einem Click ausgeführt. Um das zu veranschaulichen, mal folgende Funktionserweiterung.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Funktion 1 ausgeführt!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Funktion 2 ausgeführt!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Hier wird beim ersten Klick auf &#8220;Auf- / Zuklappen&#8221; die Funktion 1 ausgeführt. Bei einem weiterem, dem zweiten Klick wird Funktion 2 ausgeführt. Beim dritten Klick ist es nun nicht so, dass garnichts passiert. Im Gegenteil. Es wird wieder die erste Funktion ausgeführt.</p>
<p>&nbsp;</p>
<p>In unserem Fall wissen wir, dass das Div, welches wir Auf- und Zuklappen möchten, geöffnet ist. Somit können wir die erste Funktion dementsprechend anpassen und das Div schließen. In der zweiten Funktion öffnen wir es wieder.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span>300<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span>300<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/EinfuehrungII/toggle/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrungIItoggle.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Auch lässt sich der Inhalt eines Elements ganz einfach ändern. Der Einfachheit halber verwenden wir die obige toggle-Funktion sowie das passende HTML. Das einzige was wir ändern, ist die Effekt-Funktion hide &#038; show. Wir ändern beide zur Manipulations-Funktion html.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Da dies zu keinem Ergebnis führen würde, muss der Funktion noch ein Inhalt mitgegeben werden.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hallo!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;b&gt;Boa&lt;/b&gt;, ich tick aus!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/EinfuehrungII/html/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrungIIhtml.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Wie Ihr seht, kann man in der html-Funktion auch HTML mitgeben. Dies wird natürlich sofort angewendet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/jquery/jquery-einfuhrung-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Einführung</title>
		<link>http://www.punkt16.de/jquery/jquery-einfuhrung/</link>
		<comments>http://www.punkt16.de/jquery/jquery-einfuhrung/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 13:58:38 +0000</pubDate>
		<dc:creator>Palme Florian</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.punkt16.de/?p=18</guid>
		<description><![CDATA[jQuery ist ein mächtiges und auch sehr beliebtes JavaScript-Framework! Ich möchte Euch heute eine Einführung in jQuery geben und ein paar Dinge zeigen. [ <a href="http://www.punkt16.de/?p=18" target="_blank">Mehr erfahren...</a> ]]]></description>
			<content:encoded><![CDATA[<p>jQuery ist ein mächtiges und auch sehr beliebtes JavaScript-Framework! Ich möchte Euch heute eine Einführung in jQuery geben und ein paar Dinge zeigen.</p>
<p><span id="more-18"></span></p>
<p>Zu beginn müsst Ihr euch die jQuery-Bibliothek zu downloaden. Dazu geht auf die <a href="http://jquery.com" target="_blank">jQuery</a>-Page und klickt auf den großen Button rechts. Nun können wir beginnen!</p>
<p>&nbsp;</p>
<p><b>[ 1 ]</b> Wir bereiten erst einmal unser HTML-Document vor:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>jQuery Einführung<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Nachdem wir die Datei abgespeichert haben, binden wir die jQuery-Bibliothek in den <head>-Bereich der HTML-Datei ein. (Bitte denkt daran, die JS-Datei in den gleichen Ordner zu packen, wie eure HTML-Datei. Ansonsten Dateipfade anpassen. <img src='http://www.punkt16.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery-1.3.2.min.js &quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Als nächstes schreiben wir unseren ersten jQuery-Code. Dieser Teil kommt wieder in den <head>-Bereich, unter den oberen Teil.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span><br />
$(function(){<br />
&nbsp; &nbsp; &nbsp;//Hier stehen weitere Anweisungen<br />
});<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Alle Anweisungen, welche in dieser Funktion stehen, werden erst Ausgeführt, wenn die ganze Seite geladen ist. Somit gehen wir Sicher, dass unser Code immer funktioniert.</p>
<p>&nbsp;</p>
<p><b>[ 2 ]</b> Als erstes Zeige ich Euch, wie ihr HTML-Elemente ganz einfach Anzeigen (Aufklappen) und Verstecken (Zuklappen) könnt. Wir schreiben also folgenden HTML-Code in den <body>-Bereich der HTML-Datei:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">b</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;klapp&quot;</span>&gt;</span>Auf- / Zuklappen<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">b</span></a>&gt;</span><br />
&nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;klappen&quot;</span>&gt;</span>Mich kann man Auf- und Zuklappen!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span> <br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nichtklappen&quot;</span>&gt;</span>Mich kann man <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">b</span></a>&gt;</span>nicht<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">b</span></a>&gt;</span> Auf- und Zuklappen!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Anderst, wie normal in JavaScript, benötigen wir keinen Funktionsaufruf im HTML-Bereich. Das übernehmen für uns so genannte &#8220;Selectoren&#8221; &#038; &#8220;Event-Helper&#8221;. Selectoren geben an, auf welchem Element ein Event-Helper ausgeführt werden soll. Event-Helper bestimmen, wann eine Funktion ausgeführt werden soll. Dazu gehören z.B. &#8220;click&#8221;, &#8220;hover&#8221;, &#8220;mouseup&#8221;, &#8220;focus&#8221; und noch viele mehr.</p>
<p>&nbsp;</p>
<p><b>Selectoren:</b> Selectoren zeigen auf einen bestimmten Tag im HTML-Breich. Genauso, wie in CSS, können ID&#8217;s, Klassen und normale Tags angesprochen werden (#MeineId, .meineKlasse, span). In unserem Fall möchten wir, bei einem Klick auf das b-Tag mit der ID &#8220;klapp&#8221; das Div mit der Klasse &#8220;klappen&#8221; Auf- / Zuklappen. Also sprechen wir die ID an: $(&#8220;#klapp&#8221;).</p>
<p>&nbsp;</p>
<p><b>Event-Helper:</b> Wie oben schon gesagt, bestimmen Event-Helper, bei welcher User-Aktion (Mausklick, Tastendruck, &#8230;) eine Funktion ausgeführt werden soll. In unserem Beispiel verwenden wir den Event-Helper &#8220;click&#8221;. Hängen wir unserem Selector also den Event-Helper mit einer Funktion an: .click(function(){});. Euer JS-Code müsste nun so aussehen:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Nun müssen wir das Div mit der Klasse &#8220;klappen&#8221; verstecken. Dazu benötigen wir nur einen weiteren Selector (welcher auf &#8220;.klappen&#8221; zeigt) und eine Effekt-Funktion (hide, show).</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//Hier verstecken wir das Div mit der Klasse klappen</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>Bei jedem Klick würde jQuery nun versuchen, das Div zu verstecken. Also prüfen wir, ob das Div schon versteckt ist, wenn nicht, verstecken wir es. Beim verstecken wird der CSS-Style &#8220;display&#8221; auf &#8220;none&#8221; gestellt. Wir können mit der jQuery-Funktion .css Prüfen, ob das Div versteckt ist.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Jetzt einfach noch eine else-Anweisung an die If-Abfrage packen und das Div wieder anzeigen.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Nun öffnet euer HTML-Dokument im Browser und testet eure soeben geschrieben jQuery-Funktion!</p>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/Einfuehrung/1/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrung1.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><b>[ 2 ]</b> Sicherlich ist das nichts besonders, aber mit dem fast gleichem Code, kann man einen ganz anderen Effekt erzielen. Wir setzten nun in die Effekt-Funktion hide() &#038; show() jeweils eine Zahl.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/Einfuehrung/2/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrung2.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><b>[ 3 ]</b> Es gibt aber noch eine weitere Möglichkeit, ein Element Auf- bzw Zuklappen zu lassen. Ändern wir doch mal show(1000) zu slideDown(1000) und hide(1000) zu slideUp(1000).</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/Einfuehrung/3/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrung3.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><b>[ 4 ]</b> Lassen wir das Div doch mal Aus- / Einfaden. Also ändern wir wieder die Effekt-Funktionen.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#klapp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.klappen&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span>1000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td align="center"><a class="buttonTut" href="http://www.punkt16.de/wp-content/jQuery/Einfuehrung/4/">Beispiel ansehen</a></td>
<td align="center"><a class="buttonTut" href="http://downloads.punkt16.de/download.php?file=/jQuery/jQueryEinfuehrung4.zip">Kostenloser Download</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Wie Ihr seht, kann mit ganz wenig Code große Effekte erzielen. Experimentiert doch ein bisschen herum!</p>
<p>&nbsp;</p>
<p>Lg,<br />
euer Flo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.punkt16.de/jquery/jquery-einfuhrung/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
