<?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>infinita Design &#187; CSS</title>
	<atom:link href="http://infinitadesign.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://infinitadesign.com/blog</link>
	<description>coding style.</description>
	<lastBuildDate>Sat, 20 Mar 2010 01:10:30 +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>Simple JQuery Accordion menu</title>
		<link>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/</link>
		<comments>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 21:02:16 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=114</guid>
		<description><![CDATA[O JQuery torna este tipo de efeito muito fácil de ser implementado. Veremos aqui como é simples.
Primeiro é necessário uma lista com sublistas internas que funcionarão como nosso menu e submenus respectivamente.
Abaixo o codigo no menu:

&#60;ul id=&#34;menu&#34;&#62;
	&#60;li&#62;
 &#60;a href=&#34;#&#34;&#62;Empresa&#60;/a&#62;
&#60;ul&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 1&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 2&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 3&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 4&#60;/a&#62;&#60;/li&#62;
&#60;/ul&#62;
&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Conteúdo&#60;/a&#62;
&#60;ul&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 1&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a [...]]]></description>
			<content:encoded><![CDATA[<p>O JQuery torna este tipo de efeito muito fácil de ser implementado. Veremos aqui como é simples.</p>
<p>Primeiro é necessário uma lista com sublistas internas que funcionarão como nosso menu e submenus respectivamente.</p>
<p>Abaixo o codigo no menu:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Empresa<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Conteúdo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Conteúdo 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Informativo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></div></div>

<p>Em seguida, obviamente usaremos o CSS pra dar um look agradável para o menu. Repare que diferentemente do usual display:none que geralmente é utilizado em submenus, aqui não é necessário devido ao JQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 body<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Tahoma</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: #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;">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>
 ul <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;">dotted</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul ul<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul li a <span style="color: #00AA00;">&#123;</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: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f57327</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;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</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;">#b8360b</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul li li a <span style="color: #00AA00;">&#123;</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: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">13px</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;">normal</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f59247</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>Agora a mágica do JQuery, para atingir o efeito esperado usamos primeiro o &#8220;hide&#8221; para esconder nossos submenus que serão abertos com o efeito tipo Accordion. Em seguida, o truque: para cada elemento &#8220;a&#8221; é adicionado o evento click que mostra ou esconde nossos menus usando o slide criando um efeito realmente bom.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> initMenu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu ul'</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: #009900;">&#40;</span><span style="color: #3366CC;">'#menu li a'</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>
 <span style="color: #003366; font-weight: bold;">var</span> checkElement <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 checkElement.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu ul:visible'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 checkElement.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>initMenu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Com este exemplo pode-se notar que é possivel criar efeitos realmente atraentes usando jQuery utilizando muito pouco código, o que agiliza muito o trabalho. O resultado pode ser visto aqui: <a href="http://infinitadesign.com/samples/jquery_simple_accordion_menu.html" target="_blank">preview</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Font Stacks!</title>
		<link>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/</link>
		<comments>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 03:11:28 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=79</guid>
		<description><![CDATA[Este é um problema muito comum ao se criar websites é manter a tipografia pelo menos com a mesma &#8220;cara&#8221; independente do sistema operacional.
Dependendo do sistema operacional os tipos de fontes instaladas &#8211; e estas serão usadas na renderização do texto do seu website, por isso é necessário criar as chamadas &#8220;Font Stacks&#8221; que são [...]]]></description>
			<content:encoded><![CDATA[<p>Este é um problema muito comum ao se criar websites é manter a tipografia pelo menos com a mesma &#8220;cara&#8221; independente do sistema operacional.</p>
<p>Dependendo do sistema operacional os tipos de fontes instaladas &#8211; e estas serão usadas na renderização do texto do seu website, por isso é necessário criar as chamadas &#8220;Font Stacks&#8221; que são &#8220;cadeias&#8221; de fontes que serão utilizadas para renderizar o seu texto. O princípio é simples, é preciso definir a propriedade &#8220;font-family&#8221; no CSS de modo que siga uma ordem de uso. Por exemplo:</p>
<pre style="padding-left: 30px;" lang="css">body{
font-family:Verdana,Geneva,sans-serif;
}</pre>
<p>Neste caso, a primeira tentativa de uso seria  a &#8220;Verdana&#8221; que está presente na maioria dos sistemas, se por um acaso não houver suporte para esta fonte, é utilizada a segunda fonte Geneva, num caso raro onde não encontrada esta segunda será utilizada a ultima fonte que é o tipo de fonte genérico &#8220;Sans-serif&#8221;.</p>
<p>A partir dessa ideologia e após uma busca pela internet encontrei vários casos onde são mostrados <em>font stacks </em>interessantes, esta foi a que achei melhor:</p>
<p>The &#8216;wide&#8217; sans serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Verdana</span><span style="color: #00AA00;">,</span>Geneva<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;narrow&#8217; sans serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Tahoma</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: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;wide&#8217; serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Georgia</span><span style="color: #00AA00;">,</span>Utopia<span style="color: #00AA00;">,</span>Palatino<span style="color: #00AA00;">,</span><span style="color: #ff0000;">'Palatino Linotype'</span><span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;narrow&#8217; serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'Times New Roman'</span><span style="color: #00AA00;">,</span>Times<span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The monospace stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'Courier New'</span><span style="color: #00AA00;">,</span><span style="color: #ff0000;">'Courier'</span><span style="color: #00AA00;">,</span><span style="color: #993333;">monospace</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Fontes:</strong></p>
<p><a href="http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks" target="_blank">http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks</a><br />
<a href="http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks" target="_blank">http://www.sitepoint.com/article/eight-definitive-font-stacks/3/</a><br />
<a href="http://www.inspirationbit.com/striking-web-sites-with-font-stacks-that-inspire/" target="_blank">http://www.inspirationbit.com/striking-web-sites-with-font-stacks-that-inspire/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 module: Multi-column layout</title>
		<link>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/</link>
		<comments>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 17:36:35 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/?p=43</guid>
		<description><![CDATA[Resumindo, o Modulo &#8220;Multi-column&#8221; do CSS3 serve para separar o conteúdo de um elemento em multiplas colunas.

O Módulo Multi-Column é parte das específicões  do CSS3 propostas pela W3C.
This extension to the CSS Box Model opens a new range of possibilities in terms of web design. Multi-column layouts that are so pervasive in the print media [...]]]></description>
			<content:encoded><![CDATA[<p>Resumindo, o Modulo &#8220;Multi-column&#8221; do CSS3 serve para separar o conteúdo de um elemento em multiplas colunas.</p>
<p><a class="image" title="Image:Diagram-css3multicolumn.gif" href="http://www.csscripting.com/wiki/index.php?title=Image:Diagram-css3multicolumn.gif"><img longdesc="/wiki/index.php?title=Image:Diagram-css3multicolumn.gif" src="http://www.csscripting.com/wiki/images/4/4b/Diagram-css3multicolumn.gif" alt="Image:Diagram-css3multicolumn.gif" width="319" height="246" /></a></p>
<p>O <a class="external text" title="http://www.w3.org/TR/2001/WD-css3-multicol-20010118/" rel="nofollow" href="http://www.w3.org/TR/2001/WD-css3-multicol-20010118/">Módulo Multi-Column</a> é parte das específicões  do CSS3 propostas pela <a class="external text" title="http://www.w3.org" rel="nofollow" href="http://www.w3.org/">W3C</a>.</p>
<blockquote><p>This extension to the CSS Box Model opens a new range of possibilities in terms of web design. Multi-column layouts that are so pervasive in the print media (think newspapers, magazines) can now become a reality on the web</p></blockquote>
<p><a title="http://www.csscripting.com" href="http://www.csscripting.com/css-multi-column/example1.php" target="_blank">http://www.csscripting.com/css-multi-column/example1.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>47+ Excellent Ajax CSS Forms</title>
		<link>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/</link>
		<comments>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:20:46 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/2009/02/20/47-excellent-ajax-css-forms/</guid>
		<description><![CDATA[Forms needs a solid visual structure, a profound hierarchy of form elements (Fields and Labels), powerful techniques and Functionality (AJAX) to make the form look and work creatively. There is a great bunch of creative, outstanding and individually designed from scratch forms.Thanks to AJAX, we can provide real-time feedback to our users using server-side validation scripts [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Forms needs a solid visual structure, a profound hierarchy of form elements <strong>(Fields and Labels)</strong>, powerful techniques and Functionality <strong>(AJAX)</strong> to make the form look and work creatively. There is a great bunch of creative, outstanding and individually designed from scratch forms.Thanks to AJAX, we can provide real-time feedback to our users using server-side validation scripts and eliminate the need for redundant validation functions and processing data.</p></blockquote>
<blockquote><p>Let’s take a look, hopefully you’ll find new ideas you can develop further on your own.</p></blockquote>
<p><a href="http://www.noupe.com/css/47-excellent-ajax-css-forms.html" target="_blank">http://www.noupe.com/css/47-excellent-ajax-css-forms.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>medidas no CSS</title>
		<link>http://infinitadesign.com/blog/2007/08/20/medidas-no-css/</link>
		<comments>http://infinitadesign.com/blog/2007/08/20/medidas-no-css/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 17:11:22 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/2007/08/20/medidas-no-css/</guid>
		<description><![CDATA[Unit Description
%     Porcentagem
in     Polegada
cm     Centimetro
mm     Milimetro
em     1em é igual a tamanho atual de fonte. 2em significa 2 vezes o tamanho atual de fonte. Ex. Se um elemento é mostrado com um fonte de 12pt, então &#8216;2em&#8217; são 24pt, uma unidade bastante util para adapatar automáticamente à fonte que o usuário [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Unit Description</strong></p>
<p>%     Porcentagem</p>
<p>in     Polegada</p>
<p>cm     Centimetro</p>
<p>mm     Milimetro</p>
<p>em     1em é igual a tamanho atual de fonte. 2em significa 2 vezes o tamanho atual de fonte. Ex. Se um elemento é mostrado com um fonte de 12pt, então &#8216;2em&#8217; são 24pt, uma unidade bastante util para adapatar automáticamente à fonte que o usuário usa.</p>
<p>ex     um ex é a x-height de uma fonte(x-height é normalmente metade de font-size)</p>
<p>pt point(1 pt é o mesmo que 1/72 polegadas)</p>
<p>pc pica (1 pc é o mesmo que 12 points)</p>
<p>px pixels (um ponto na tela do computador)</p>
<p><strong>Colors<br />
Unit Description</strong><br />
color_name     Nome de uma cor (e.g. red)</p>
<p>rgb(x,x,x)     Um valor RGB (e.g. rgb(255,0,0))</p>
<p>rgb(x%, x%, x%)     Um valor percentual RGB (e.g. rgb(100%,0%,0%))</p>
<p>#rrggbb     Numero HEX (e.g. #ff0000)</p>
<p>fonte:<font size="-1"><span class="a"> <a target="_blank" href="http://infinitadesign.com/wp-admin/www.w3.org" title="www.w3.org ">www.<strong>w3</strong>.org</a></span></font><a target="_blank" href="http://infinitadesign.com/wp-admin/www.w3.org" title="www.w3.org "> </a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2007/08/20/medidas-no-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

