<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Silici0 :: Blog</title>
	<link>http://www.rafaelcunha.com</link>
	<description>Php, JS, JQuery, Ajax e +++</description>
	<pubDate>Tue, 09 Mar 2010 22:05:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>JQuery a primeira coisa para aprender</title>
		<link>http://www.rafaelcunha.com/2008/06/24/jquery-a-primeira-coisa-para-aprender/</link>
		<comments>http://www.rafaelcunha.com/2008/06/24/jquery-a-primeira-coisa-para-aprender/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 02:35:24 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>Informatica</category>

		<category>JavaScript</category>

		<category>JQuery</category>

		<guid isPermaLink="false">http://www.rafaelcunha.com/2008/06/24/jquery-a-primeira-coisa-para-aprender/</guid>
		<description><![CDATA[Se vocÃª ja copiou e colou diversos script em JQuery e ainda nÃ£o se preocupou em aprender ou estudar a fundo o funcionamento dele, a primeira coisa com que se preocupar Ã© a funÃ§Ã£o mais importante do JQuery, se vocÃª quer que seu cÃ³digo JQuery funcione dentro do seu site, coloque-o dentro da funÃ§Ã£o $(document).ready().
Colocando [...]]]></description>
			<content:encoded><![CDATA[<p>Se vocÃª ja copiou e colou diversos script em <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Framework"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JQuery</a> e ainda nÃ£o se preocupou em aprender ou estudar a fundo o funcionamento dele, a primeira coisa com que se preocupar Ã© a funÃ§Ã£o mais importante do JQuery, se vocÃª quer que seu cÃ³digo JQuery funcione dentro do seu site, coloque-o dentro da funÃ§Ã£o $(document).ready().</p>
<p>Colocando seu cÃ³digo dentro desta funÃ§Ã£o irÃ¡ fazer com que o cÃ³digo rode assim que o <a href="http://pt.wikipedia.org/wiki/DOM" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/DOM');"  class="alinks_links" onclick="return alinks_click(this);" title="Document Object Model"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">DOM</a> esteja pronto no seu site, antes que todo o conteÃºdo da pÃ¡gina seja lida.</p>
<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showCodeTxt('javascript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// coloque todo seu cÃ³digo aqui</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>E fica a dica, vocÃª pode criar quantos vocÃª quiser. Ele Ã© a troca pelo famoso/antigo window.onload do JavaScript.<!--734224a5a191dc85345733b9748ee01d--><!--2069c10e72dd6b497e8b6bc84f8c8cfb--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2008/06/24/jquery-a-primeira-coisa-para-aprender/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Do SelectBox para o ListBox</title>
		<link>http://www.rafaelcunha.com/2007/10/01/do-selectbox-para-o-listbox/</link>
		<comments>http://www.rafaelcunha.com/2007/10/01/do-selectbox-para-o-listbox/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 17:21:36 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>Informatica</category>

		<category>php</category>

		<category>JavaScript</category>

		<category>JQuery</category>

		<category>Tutorial</category>

		<guid isPermaLink="false">http://www.rafaelcunha.com/2007/10/01/do-selectbox-para-o-listbox/</guid>
		<description><![CDATA[Tutorialzinho para criarmos um selectbox e um listbox apartir do formulÃ¡rio em html e entÃ£o atravÃ©s do JQuery adicionarmos os itens no Listbox e entÃ£o pegarmos o valor por mÃ©todo POST no PHP.
A idÃ©ia do tutorial seria uma lista de itens adicionado a um listbox, formando um carrinho de compras dos itens, para depois entÃ£o [...]]]></description>
			<content:encoded><![CDATA[<p>Tutorialzinho para criarmos um selectbox e um listbox apartir do formulÃ¡rio em html e entÃ£o atravÃ©s do <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Framework"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JQuery</a> adicionarmos os itens no Listbox e entÃ£o pegarmos o valor por mÃ©todo POST no PHP.</p>
<p>A idÃ©ia do tutorial seria uma lista de itens adicionado a um listbox, formando um carrinho de compras dos itens, para depois entÃ£o enviarmos tudo de uma vez so atravÃ©s do POST do form, gerando uma array para o PHP, Ã© um dos clÃ¡ssicos em programaÃ§Ã£o. Como muita gente nÃ£o sabe da possibilidade em html/php deixo um tutorial para se ter uma idÃ©ia de como utilizar esse recurso.<br />
Sem mais delongas vamos ao cÃ³digo, primeiramente o form, claramente veremos que o nosso listbox na verdade Ã© um selectbox com a tag de multiple (virando assim um listbox):</p>
<div class="igBar"><span id="lhtml-5"><a href="#" onclick="javascript:showCodeTxt('html-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-5">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/form.html');"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span> <span style="color: #000066;">enctype</span>=<span style="color: #ff0000;">"multipart/form-data"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"F1"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"F1"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/select.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/select.html');"><span style="color: #000000; font-weight: bold;">&lt;select</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"func"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"func"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/option.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/option.html');"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"1"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Numero 1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/option.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/option.html');"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"2"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Numero 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/option.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/option.html');"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"3"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Numero 3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/input.html');"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"button"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"add"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"Adicionar"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/select.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/select.html');"><span style="color: #000000; font-weight: bold;">&lt;select</span></a> <span style="color: #000066;">multiple</span>=<span style="color: #ff0000;">"multiple"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"eq"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"eq[]"</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">"7"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/input.html');"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"Submit2"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"submit"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"EnvioDados"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"ENVIAR DADOS"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Agora podemos escrever o cÃ³digo do JQuery com <a href="http://pt.wikipedia.org/wiki/DOM" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/DOM');"  class="alinks_links" onclick="return alinks_click(this);" title="Document Object Model"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">DOM</a> para facilitar nossa vida:</p>
<div class="igBar"><span id="ljavascript-6"><a href="#" onclick="javascript:showCodeTxt('javascript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//Click do botÃ£o ADD</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"input[@name=add]"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> id_selecionado = document.<span style="color: #006600;">F1</span>.<span style="color: #006600;">func</span>.<span style="color: #006600;">selectedIndex</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> valor_selecionado = document.<span style="color: #006600;">F1</span>.<span style="color: #006600;">func</span>.<span style="color: #006600;">options</span><span style="color: #66cc66;">&#91;</span>id_selecionado<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">text</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> id_indice_selecionado = document.<span style="color: #006600;">F1</span>.<span style="color: #006600;">func</span>.<span style="color: #006600;">options</span><span style="color: #66cc66;">&#91;</span>id_selecionado<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">value</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'select[@id=eq]'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'&lt;option value=&quot;'</span>+ id_indice_selecionado +<span style="color: #3366CC;">'&quot;&gt;'</span>+ valor_selecionado +<span style="color: #3366CC;">'&lt;/option&gt;'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//desabilita o valor adicionado;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">document.<span style="color: #006600;">F1</span>.<span style="color: #006600;">func</span>.<span style="color: #006600;">options</span><span style="color: #66cc66;">&#91;</span>id_selecionado<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">disabled</span>=<span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Click do botao do submit</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'input[@name=Submit2]'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> x=document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"eq"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">&#40;</span>i=<span style="color: #CC0000;color:#800000;">0</span>;i&lt;x.<span style="color: #006600;">length</span>;i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">x.<span style="color: #006600;">options</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">selected</span>=<span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Muito legal nÃ©? Mas e para remover ? Bom, para remover eu recomendo dar uma procurada na net sobre um plugin para ListBox usando o JQuery, vocÃªs nÃ£o querem tudo na mÃ£o nÃ©? DÃºvidas e sugestÃµes Ã© so comentar.<!--0bf8b245db92d88e36bfb08f53477a22--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2007/10/01/do-selectbox-para-o-listbox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JQuery - Ajax mÃ©todos</title>
		<link>http://www.rafaelcunha.com/2007/08/26/jquery-ajax-metodos/</link>
		<comments>http://www.rafaelcunha.com/2007/08/26/jquery-ajax-metodos/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 23:42:06 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>JQuery</category>

		<category>AJAX</category>

		<guid isPermaLink="false">http://rafaelcunha.com/2007/08/26/jquery-ajax-metodos/</guid>
		<description><![CDATA[Lista de mÃ©todos do JQuery para se usar o Ajax, como eu utilizei alguns vou falar sobre os outros, uma breve descriÃ§Ã£o para utilizaÃ§Ã£o, como usar vide o manual:
$.ajax( propriedades )
Abre uma pÃ¡gina remota utilizando o requeste de HTTP. Pode ser utilizado com envio de POST, GET e leitura de scripts JS e muito mais.
$.ajaxSetup [...]]]></description>
			<content:encoded><![CDATA[<p>Lista de mÃ©todos do <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Framework"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JQuery</a> para se usar o <a href="http://pt.wikipedia.org/wiki/AJAX_%28programa%C3%A7%C3%A3o%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/AJAX_%28programa%C3%A7%C3%A3o%29');"  class="alinks_links" onclick="return alinks_click(this);" title="Asynchronous JavaScript and XML"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">Ajax</a>, como eu utilizei alguns vou falar sobre os outros, uma breve descriÃ§Ã£o para utilizaÃ§Ã£o, como usar vide o <a title="DocumentaÃ§Ã£o do Jquery" target="_blank" href="http://docs.jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://docs.jquery.com');">manual</a>:</p>
<p>$.ajax( propriedades )<br />
Abre uma pÃ¡gina remota utilizando o requeste de HTTP. Pode ser utilizado com envio de POST, GET e leitura de scripts JS e muito mais.</p>
<p>$.ajaxSetup ( propriedades )<br />
Seta todas propriedades GLOBAL do request do ajax.</p>
<p>$.ajaxTimeout( time )<br />
Seta o tempo no qual ocorrerÃ¡ a espera antes da execuÃ§Ã£o da requisiÃ§Ã£o do ajax.</p>
<p>$.get( <a href="http://pt.wikipedia.org/wiki/URL" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/URL');"  class="alinks_links" onclick="return alinks_click(this);" title="Uniform Resource Locator"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">url</a>, parametros, retorno da chamada )<br />
LÃª uma pÃ¡gina remota enviando os dados via GET, mandando URL, parametros sÃ£o os dados do GET e possibilidade de fazer controle de error no retorno.</p>
<p>$.getJSON( url, parametros, retorno da chamada )<br />
LÃª dados <a href="http://pt.wikipedia.org/wiki/JSON" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/JSON');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Object Notation"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JSON</a> utilizando requisiÃ§Ã£o HTTP.</p>
<p>$.getScript( url, retorno da chamada )<br />
LÃª e executa um script JavaScript utilizando requisiÃ§Ã£o HTTP GET.</p>
<p>$.post( ? vide outros topicos ?)</p>
<p>ajaxComplete( retorno )<br />
FunÃ§Ã£o que serÃ¡ executada apÃ³s o ajax ter completado.</p>
<p>ajaxError( retorno )<br />
FunÃ§Ã£o que serÃ¡ executada caso a requisiÃ§Ã£o falhe.</p>
<p>ajaxSend( retorno )<br />
FunÃ§Ã£o que serÃ¡ executada antes da requisiÃ§Ã£o do ajax ser enviado.</p>
<p>ajaxStop( retorno )<br />
FunÃ§Ã£o que serÃ¡ executada apÃ³s todas requisiÃ§Ãµes ajax terminarem.</p>
<p>ajaxSucess( retorno )<br />
FunÃ§Ã£o que serÃ¡ executada apÃ³s todas requisiÃ§Ãµes ajax forem bem sucedidas.</p>
<p>load( url, parametros, retorno )<br />
LÃª um arquivo HTML e injeta isto ao <a href="http://pt.wikipedia.org/wiki/DOM" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pt.wikipedia.org/wiki/DOM');"  class="alinks_links" onclick="return alinks_click(this);" title="Document Object Model"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">DOM</a>.</p>
<p>EntÃ£o estÃ£o ae todas ou pelos menos algumas possibilidades que o JQuery lhe da para trabalhar com AJAX, espero que ajude a organizar um pouco as idÃ©ias e melhorar na produÃ§Ã£o, ganhar um pouco em cÃ³digo, pois pelo que eu vi, em vez de usarem os mÃ©todos prontos o pessoal tem usado DOM e as vezes retornado problemas diante do I.E.<!--1b129a99e63b081ffc17df18e4ca692f--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2007/08/26/jquery-ajax-metodos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Show/Hide (Abrir/Fechar) do JQuery para Menus</title>
		<link>http://www.rafaelcunha.com/2007/06/13/showhide-abrirfechar-do-jquery-para-menus/</link>
		<comments>http://www.rafaelcunha.com/2007/06/13/showhide-abrirfechar-do-jquery-para-menus/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 13:15:45 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>Informatica</category>

		<category>Trabalho</category>

		<category>php</category>

		<category>JavaScript</category>

		<category>JQuery</category>

		<guid isPermaLink="false">http://rafaelcunha.com/2007/06/13/showhide-abrirfechar-do-jquery-para-menus/</guid>
		<description><![CDATA[Vou screver esse tutorial com base no MORE Showing, MORE hiding, do site Learning JQuery, no qual Ã© recomendadissimo a leitura para quem entende de inglÃªs e quer aprender mais sobre Jquery, site cheio de dicas e tutoriais...
Se vocÃª estÃ¡ perdido aqui e nunca viu nada sobre Jquery, vocÃª pode comeÃ§ar com o tutorial original [...]]]></description>
			<content:encoded><![CDATA[<p>Vou screver esse tutorial com base no <a target="_blank" title="Show and Hide with JQuery" href="http://www.learningjquery.com/2007/02/more-showing-more-hiding" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.learningjquery.com/2007/02/more-showing-more-hiding');">MORE Showing, MORE hiding</a>, do site Learning <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Framework"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JQuery</a>, no qual Ã© recomendadissimo a leitura para quem entende de inglÃªs e quer aprender mais sobre Jquery, site cheio de dicas e tutoriais...</p>
<p>Se vocÃª estÃ¡ perdido aqui e nunca viu nada sobre Jquery, vocÃª pode comeÃ§ar com o tutorial original <a target="_blank" href="http://i18n.2kminterativa.com.br/jquery/jquery-getting-started-pt_br.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://i18n.2kminterativa.com.br/jquery/jquery-getting-started-pt_br.html');">Traduzido</a>.</p>
<p>Para os elementos do Abrir e Fechar do Menu vamos usar somente HTML e complementos de CSS para ficar 'bonito'.</p>
<div class="igBar"><span id="lhtml-11"><a href="#" onclick="javascript:showCodeTxt('html-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-11">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/div.html');"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"try"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/h3.html');"><span style="color: #000000; font-weight: bold;">&lt;h3&gt;</span></a></span>Musicas<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/div.html');"><span style="color: #000000; font-weight: bold;">&lt;div&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Offscpring <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Insonic <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Killer Buds <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>DJ SKILLO <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>DJ PASSA MAL <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>DJ silici0 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/h3.html');"><span style="color: #000000; font-weight: bold;">&lt;h3&gt;</span></a></span>Videos<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/div.html');"><span style="color: #000000; font-weight: bold;">&lt;div&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Malabares <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Clips<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Musica<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Filmes<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/h3.html');"><span style="color: #000000; font-weight: bold;">&lt;h3&gt;</span></a></span>XXX<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/div.html');"><span style="color: #000000; font-weight: bold;">&lt;div&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Blonde<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Branca<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Verde<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"interno"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Amarelo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Vamos ao CSS para melhorar o visual:</p>
<div class="igBar"><span id="lcss-12"><a href="#" onclick="javascript:showCodeTxt('css-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-12">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-left</span>: 0px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-top</span>: 0px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-right</span>: 0px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-bottom</span>: 0px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.try<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-style</span>:<span style="color: #993333;">normal</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-family</span>:Arial;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:14px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-left</span>:20px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.try </span>h3 <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding</span>: .25em;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>: #99FFCC;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">border-top</span>: 1px <span style="color: #993333;">solid</span> #999966;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">border-bottom</span>: 1px <span style="color: #993333;">solid</span> #999966;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.interno<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding</span>: .25em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-left</span>:15px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Essa opÃ§Ã£o permite que cada sessÃ£o possa ser aberta e fechada independente de outras. Esse Ã© o modo mais fÃ¡cil de fazer o menu de Ã¡rvore.</p>
<p>O mÃ©todo que iremos usar Ã© .slidetoggle(), Ã© um elemento que escorrega para baixo o menu quando for abrir e escorrega para cima quando for fechar.</p>
<p>Primeiramente vamos esconder todos itens do sub-menu e tambÃ©m vamos conectar cada click para cada h3.</p>
<div class="igBar"><span id="ljavascript-13"><a href="#" onclick="javascript:showCodeTxt('javascript-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-13">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'div.try:eq(0)&gt; div'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">hide</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'div.try:eq(0)&gt; h3'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Usamos :eq() que Ã© um seletor que passa por todos DIV e H3, dando HIDE e entÃ£o criando opÃ§Ã£o do click.</p>
<p>EntÃ£o colocaremos o mÃ©todo .slidetoggle() dentro do mÃ©todo click. Como sabemos que cada DIV que queremos mudar a opÃ§Ã£o para Mostrar/Esconder Ã© a prÃ³xima tag de cada H3, podemos usar o metodo .next():</p>
<div class="igBar"><span id="ljavascript-14"><a href="#" onclick="javascript:showCodeTxt('javascript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-14">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'div.try:eq(0)&gt; div'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">hide</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'div.try:eq(0)&gt; h3'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">slideToggle</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'fast'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nesta ultima linha que adicionamos nos dizemos que para o H3 clicado nos referimos o metodo .slidetoggle() para a prÃ³xima TAG.</p>
<p>Supersimples nÃ£o Ã© mesmo? VocÃª pode ver o cÃ³digo de outros modos nesse exemple que eu fiz: <a target="_blank" href="http://rafaelcunha.com/testes/hideshow/hideshow.php" >Exemplo</a>. DÃºvidas? SugestÃµes? So comentar... abraÃ§os<!--231456fa9605ae250fd3b9bd545fa106--><!--44f3c2fecc4ad6ddfd3790e92d542bdf--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2007/06/13/showhide-abrirfechar-do-jquery-para-menus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ExpressÃµes do JQuery - XPath</title>
		<link>http://www.rafaelcunha.com/2007/05/22/expressoes-do-jquery-xpath/</link>
		<comments>http://www.rafaelcunha.com/2007/05/22/expressoes-do-jquery-xpath/#comments</comments>
		<pubDate>Tue, 22 May 2007 13:04:51 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>Informatica</category>

		<category>JavaScript</category>

		<category>JQuery</category>

		<guid isPermaLink="false">http://rafaelcunha.com/2007/05/22/expressoes-do-jquery-xpath/</guid>
		<description><![CDATA[Vou falar um pouco sobre modo de como acessar DIVS, TAGS html entre outros, para melhorar a idÃ©ia do modelo como um todo.
Existem diversas maneiras de se acessar e usar as expressÃµes do JQuery para acessar a div ou tag que vocÃª quer mudar um atributo e/ou valor. Vou falar basicamente de acesso por nomesÂ [...]]]></description>
			<content:encoded><![CDATA[<p>Vou falar um pouco sobre modo de como acessar DIVS, TAGS html entre outros, para melhorar a idÃ©ia do modelo como um todo.</p>
<p>Existem diversas maneiras de se acessar e usar as expressÃµes do <a href="http://jquery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com');"  class="alinks_links" onclick="return alinks_click(this);" title="JavaScript Framework"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">JQuery</a> para acessar a div ou tag que vocÃª quer mudar um atributo e/ou valor. Vou falar basicamente de acesso por nomesÂ  DIV e CLASS, e da XPath que Ã© um modelo fÃ¡cil de acessar.</p>
<p>Imaginemos que vocÃª tenha o seguinte cÃ³digo:</p>
<div class="igBar"><span id="lhtml-22"><a href="#" onclick="javascript:showCodeTxt('html-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-22">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/div.html');"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'viu'</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/span.html');"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">'cla'</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>TEXTO<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/form.html');"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">'POST'</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/input.html');"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text'</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">'3'</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'viu'</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://december.com/html/4/element/input.html');"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text'</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'naoviu'</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A dÃºvida fica no ar, como acessar a div viu e o input viu?</p>
<p>Se formos acessar a div ID='viu', podemos simplesmente fazer o seguinte:</p>
<div class="igBar"><span id="ljavascript-23"><a href="#" onclick="javascript:showCodeTxt('javascript-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-23">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'div#viu'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Onde entÃ£o, vocÃª viu que para acessar um ID vocÃª usa #</p>
<p>Para acessarmos o input ID='viu', pode simplesmente fazer o seguinte:</p>
<div class="igBar"><span id="ljavascript-24"><a href="#" onclick="javascript:showCodeTxt('javascript-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-24">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'input#viu'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Ja sei, vocÃª sacou a idÃ©ia.. hm.... e para acessar uma classe? No nosso caso a classe 'cla'!</p>
<div class="igBar"><span id="ljavascript-25"><a href="#" onclick="javascript:showCodeTxt('javascript-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-25">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'span.cla'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="ljavascript-26"><a href="#" onclick="javascript:showCodeTxt('javascript-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-26">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'.cla'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para acessar o id 'naoviu' ?</p>
<div class="igBar"><span id="ljavascript-27"><a href="#" onclick="javascript:showCodeTxt('javascript-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-27">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#naoviu'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>E para usar XPath ? Que tem a ver?Â  VocÃª pode usar os metodos de XPath para acessar os dados, metodos e atributos tambÃ©m... Maneira mais facil ao meu ver.</p>
<p>Para acessar o input com name = 3, faÃ§amos...</p>
<div class="igBar"><span id="ljavascript-28"><a href="#" onclick="javascript:showCodeTxt('javascript-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-28">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'input[@name=3'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Acho que deu para entender um pouco de como funciona as expressÃµes para acesso de valores, atributos e metodos de tudo quanto Ã© TAG xhtml, DIV e outros afins... ehhehee<!--ced29e1db1c5961eafeb8c1d5a1ccd4a--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2007/05/22/expressoes-do-jquery-xpath/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ajax com JQuery : Download</title>
		<link>http://www.rafaelcunha.com/2007/05/20/ajax-com-jquery-download/</link>
		<comments>http://www.rafaelcunha.com/2007/05/20/ajax-com-jquery-download/#comments</comments>
		<pubDate>Sun, 20 May 2007 20:07:00 +0000</pubDate>
		<dc:creator>silici0</dc:creator>
		
		<category>Informatica</category>

		<category>php</category>

		<category>JQuery</category>

		<category>AJAX</category>

		<guid isPermaLink="false">http://rafaelcunha.com/2007/05/20/ajax-com-jquery-download/</guid>
		<description><![CDATA[A pedidos estou disponibilizando o download dos arquivos do post : Ajax + Jquery = Facilidade para que possam identificar melhor os script escritos no tutorial. Basta clicar no link abaixo para fazer o download dos arquivos.
AJQDownload
DÃºvidas Ã© comentar. AbraÃ§os e boa diversÃ£o.
]]></description>
			<content:encoded><![CDATA[<p>A pedidos estou disponibilizando o download dos arquivos do post :<a href="http://rafaelcunha.com/2007/04/27/ajax-jquery-facilidade/" > Ajax + Jquery = Facilidade </a>para que possam identificar melhor os script escritos no tutorial. Basta clicar no link abaixo para fazer o download dos arquivos.<br />
<a href="http://www.rafaelcunha.com/testes/AJAX com JQuery.php.zip" onclick="javascript:pageTracker._trackPageview('/downloads/testes/AJAX com JQuery.php.zip');"  class="alinks_links" onclick="return alinks_click(this);" title="Download dos arquivos do tutorial"  style="padding-right: 13px; background: url(http://rafaelcunha.com/WordPress/wp-content/plugins/alinks/images/external.png) center right no-repeat;" rel="external">AJQDownload</a><br />
DÃºvidas Ã© comentar. AbraÃ§os e boa diversÃ£o.<!--d7016d2003233176a6f8800eac5fc221--><!--073a75c8da81ea4f60c476b65eeb8f6f--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rafaelcunha.com/2007/05/20/ajax-com-jquery-download/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
