<?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>GSaraiva&#039;s Projects &#187; jQuery</title>
	<atom:link href="http://projects.pro.br/gsaraiva/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://projects.pro.br/gsaraiva</link>
	<description>Step by step</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:14:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery: Criando códigos facilitadores</title>
		<link>http://projects.pro.br/gsaraiva/2008/06/jquery-criando-codigos-facilitadores/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/06/jquery-criando-codigos-facilitadores/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 02:14:48 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Asynchronous Javascript And XML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=97</guid>
		<description><![CDATA[Camaradas,
Respeitando a sequência dos artigos hoje vou falar sobre como facilitar o desenvolvimento web utilizando o jQuery. 
Muitos aqui devem saber que o JavaScript antigamente não era lá aquele modelo respeitado de linguagem interpretada, mas após a liberação do Prototype e do objeto Ajax o negócio ficou diferente.
O que é o Prototype?

O Prototype antigamente era [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Camaradas,</strong></p>
<p>Respeitando a sequência dos artigos hoje vou falar sobre como facilitar o desenvolvimento web utilizando o jQuery. </p>
<p>Muitos aqui devem saber que o JavaScript antigamente não era lá aquele modelo respeitado de linguagem interpretada, mas após a liberação do Prototype e do objeto Ajax o negócio ficou diferente.</p>
<h4>O que é o Prototype?</h4>
<dl>
O Prototype antigamente era restrito ao escopo do browser, só ele mexer nas propriedades dos objetos DOM e Javascript.<br />
Hoje, já podemos contar com essa parte na hora de desenvolver um código em JavaScript. Essa liberação do Prototype ampliou as possibilidades de utilização do JavaScript de uma forma que fez o mesmo renascer das cinzas, epoca aonde o Flash e estruturas de Server-side estavam fazendo o trabalho pesado.</p>
<p><strong>Mas qual a real função do Prototype?</strong><br />
O Prototype é o que possibilita a criação de classes estruturadas no JavaScript, exemplo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;Person <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>AData<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;sData <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> AData<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #000066;">Name</span> <span style="color: #339933;">=</span> sData<span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #660066;">Age</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>sData<span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #660066;">Job</span> <span style="color: #339933;">=</span> sData<span style="color: #009900;">&#91;</span>2<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li>&nbsp;&nbsp;Person.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">data</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">Name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Age<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Job<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span>&nbsp;&nbsp;</li><li>&nbsp;&nbsp;Person.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">Show</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #000066;">Name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #3366CC;">&quot;Age: &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #660066;">Age</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #3366CC;">&quot;Working as &quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">data</span>.<span style="color: #660066;">Job</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Gilberto Saraiva;23;Programmer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">Show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Infelizmente, não sei porque cargas d&#8217;agua, lançaram uma library pra JavaScript de nome Prototype e isso dificulta muito a obtenção de material sobre o verdadeiro Prototype. Fora que com esse nome muita gente fica iludida e acaba por pensar que Prototype é apenas uma library e quem não a usa não vai poder usar o Prototype verdadeiro.
</dl>
<h4>O que é o Ajax?</h4>
<dl>
Muitos confundem o Ajax como uma linguagem, como uma estrutura adicional, mas isso é um engano, o Ajax nada mais é que um método de utilização do objeto Ajax (Asynchronous Javascript And XML). Resumidamente podemos dizer que o Ajax é o jeito que utilizamos para fazer chamadas assincrônicas a outras partes do nosso servidor web (via HTTP1.1) para obtermos conteúdo sem precisar fazer uma requisição HTTP principal e recarregar a página novamente. A principal funcionalidade é poder modificar partes do conteúdo de um site através do objeto Ajax sem precisar efetuar uma atualização completa no código, sendo que o mesmo precisa apenas de uma pequena parte modificada e o resto continua estático. Não vou colocar um exemplo de como utilizar o objeto Ajax nativamente, pois o mesmo não é crossbrowser, e a interação é diferente em alguns browsers.
</dl>
<h4>Vamos a ação</h4>
<p>Vou tentar ser prático e resolver alguns problemas que encontramos no dia a dia na hora de desenvolver algum sistema web. A utilização do jQuery facilitará a manipulação dos elementos, vou resolver as questões do modo normal e outra com o jQuery, para termos de comparação.</p>
<dl>
<h5>Como esconder e exibir elementos HTML?</h5>
<dl>
<h6>JavaScript puro</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Blink <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Blink&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;setInterval<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">with</span><span style="color: #009900;">&#40;</span>Blink.<span style="color: #660066;">style</span><span style="color: #009900;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>display <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;none&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 250<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Blink&quot;</span>&gt;</span>Texto<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<h6>jQuery</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;$<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$Blink <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#Blink&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;setInterval<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Blink.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 250<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Blink&quot;</span>&gt;</span>Texto<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE-->
</dl>
<h5>Como listar elementos HTML pela tag?</h5>
<dl>
<h6>JavaScript puro</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;elems <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;DIV&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>elems.<span style="color: #660066;">length</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' DIVs foram encontrados'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> elems.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>elems<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<h6>jQuery</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;$<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$elems <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;DIV&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> </li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>$elems.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$elems.<span style="color: #660066;">each</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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">innerHTML</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE-->
</dl>
<h5>Como posso listar todos os links contidos na minha página?</h5>
<dl>
<h6>JavaScript puro</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;aTags <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;A&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Hrefs <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> aTags.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hrefs <span style="color: #339933;">+=</span> aTags<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&nbsp;&nbsp; link: &quot;</span> <span style="color: #339933;">+</span> aTags<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>Hrefs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><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;http://google.com/&quot;</span>&gt;</span>Google.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://yahoo.com/&quot;</span>&gt;</span>Yahoo.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://gsaraiva.projects.pro.br/&quot;</span>&gt;</span>gsaraiva.projects.pro.br<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://jquery.com/&quot;</span>&gt;</span>jQuery.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<h6>jQuery</h6>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;$<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Hrefs <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;A&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hrefs <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&nbsp;&nbsp; link: &quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>Hrefs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><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;http://google.com/&quot;</span>&gt;</span>Google.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://yahoo.com/&quot;</span>&gt;</span>Yahoo.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://gsaraiva.projects.pro.br/&quot;</span>&gt;</span>gsaraiva.projects.pro.br<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><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;http://jquery.com/&quot;</span>&gt;</span>jQuery.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE-->
</dl>
</dl>
<p>Espero que esse artigo ajude a você entender melhor o jQuery e porque utiliza-lo, você mesmo poderá fazer suas comparações e sentir que ele realmente ajudará no desenvolvimento.</p>
<blockquote><p>
Próximo artigo:</p>
<li>Adicionando funções e propriedades aos objetos HTML</li>
</blockquote>
<blockquote><p>
Artigos jQuery relacionados:</p>
<li><a href="http://gsaraiva.projects.pro.br/?p=11">Como iniciar a utilização do jQuery</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=21">Tudo que você precisa é o link</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=19">Os Seletores (Selectors)</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=97">Criando códigos facilitadores</a></li>
</blockquote>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/06/jquery-criando-codigos-facilitadores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: jQuery.Animator</title>
		<link>http://projects.pro.br/gsaraiva/2008/05/jquery-jqueryanimator/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/05/jquery-jqueryanimator/#comments</comments>
		<pubDate>Fri, 23 May 2008 11:04:24 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery.Animator]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=43</guid>
		<description><![CDATA[Folks,
I wrote a plugin to make our life easy! the new jQuery.Animator.
the example:
&#60;html&#62;&#60;head&#62;&#60;title&#62;&#60;/title&#62;&#60;script type=&#34;text/javascript&#34; src=&#34;jquery-1.2.5.js&#34;&#62;&#60;/script&#62;&#60;script type=&#34;text/javascript&#34; src=&#34;jquery.animator.js&#34;&#62;&#60;/script&#62;&#60;script language=&#34;JavaScript&#34;&#62;&#60;!--&#160;&#160;function AnimateWalker&#40;Walker, GoEnd&#41;&#123;&#160;&#160;&#160;&#160;newLeft = parseInt&#40;Walker.css&#40;&#34;left&#34;&#41;&#41; + 5;&#160;&#160;&#160;&#160;if&#40;GoEnd&#41; newLeft = 400;&#160;&#160;&#160;&#160;Walker.css&#40;&#34;left&#34;, newLeft&#41;;&#160;&#160;&#160;&#160;return &#40;newLeft &#60; 400&#41;;&#160;&#160;&#125;&#160;&#160;&#160;function AnimateWalker3&#40;Walker, GoEnd&#41;&#123;&#160;&#160;&#160;&#160;// GoEnd can't be calculated, it's a infinite animation&#160;&#160;&#160;&#160;newLeft = parseInt&#40;Walker.css&#40;&#34;left&#34;&#41;&#41; + 10;&#160;&#160;&#160;&#160;if&#40;newLeft &#62; 400&#41; newLeft = 0;&#160;&#160;&#160;&#160;Walker.css&#40;&#34;left&#34;, newLeft&#41;;&#160;&#160;&#160;&#160;return true; // infinte&#160;&#160;&#125;&#160;&#160;&#160;$&#40;function&#40;&#41;&#123;&#160;&#160;&#160;&#160;$&#40;&#34;#Walker&#34;&#41;.animator&#40;10, AnimateWalker&#41;;&#160;&#160;&#160;&#160;$&#40;&#34;#Walker2&#34;&#41;.animator&#40;10, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>I wrote a plugin to make our life easy! the new jQuery.Animator.</p>
<p>the example:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery-1.2.5.js&quot;</span>&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.animator.js&quot;</span>&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;<span style="color: #003366; font-weight: bold;">function</span> AnimateWalker<span style="color: #009900;">&#40;</span>Walker<span style="color: #339933;">,</span> GoEnd<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;newLeft <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>Walker.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>GoEnd<span style="color: #009900;">&#41;</span> newLeft <span style="color: #339933;">=</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Walker.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #339933;">,</span> newLeft<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>newLeft <span style="color: #339933;">&lt;</span> 400<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #003366; font-weight: bold;">function</span> AnimateWalker3<span style="color: #009900;">&#40;</span>Walker<span style="color: #339933;">,</span> GoEnd<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006600; font-style: italic;">// GoEnd can't be calculated, it's a infinite animation</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;newLeft <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>Walker.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>newLeft <span style="color: #339933;">&gt;</span> 400<span style="color: #009900;">&#41;</span> newLeft <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Walker.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #339933;">,</span> newLeft<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// infinte</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;$<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#Walker&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animator</span><span style="color: #009900;">&#40;</span>10<span style="color: #339933;">,</span> AnimateWalker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#Walker2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animator</span><span style="color: #009900;">&#40;</span>10<span style="color: #339933;">,</span> AnimateWalker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#Walker3&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animator</span><span style="color: #009900;">&#40;</span>10<span style="color: #339933;">,</span> AnimateWalker3<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Walker&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;position:relative;left:0;width:100px;height:50px;background:#000;color:#fff&quot;</span>&gt;</span>Animation Test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Walker2&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;position:relative;left:50;width:100px;height:50px;background:#0F0;color:#fff&quot;</span>&gt;</span>Animation Test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Walker3&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;position:relative;left:100;width:100px;height:50px;background:#00F;color:#fff&quot;</span>&gt;</span>Animation Test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>The effect will be like this:<br />
<script language="JavaScript">
<!--
  function AnimateWalker(Walker, GoEnd){
    newLeft = parseInt(Walker.css("left")) + 5;
    if(GoEnd) newLeft = 400;
    Walker.css("left", newLeft);
    return (newLeft < 400);
  }
  
  function AnimateWalker3(Walker, GoEnd){
    // GoEnd can't be calculated, it's a infinite animation
    newLeft = parseInt(Walker.css("left")) + 10;
    if(newLeft > 400) newLeft = 0;
    Walker.css("left", newLeft);
    return true; // infinte
  }

  $(function(){
    $("#Walker").animator(10, AnimateWalker);
    $("#Walker2").animator(10, AnimateWalker);
    $("#Walker3").animator(10, AnimateWalker3);
  });
//-->
</script></p>
<div id="Walker" style="position:relative;left:0;width:100px;height:50px;background:#000;color:#fff">Animation Test</div>
<div id="Walker2" style="position:relative;left:50;width:100px;height:50px;background:#0F0;color:#fff">Animation Test</div>
<div id="Walker3" style="position:relative;left:100;width:100px;height:50px;background:#00F;color:#fff">Animation Test</div>
<p>Crazzy uhm?!</p>
<p><a href="http://gsaraiva.projects.pro.br/?page_id=44">jQuery.Animator plugin page</a></p>
<p>Hugs for all</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/05/jquery-jqueryanimator/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery: Os Seletores (Selectors)</title>
		<link>http://projects.pro.br/gsaraiva/2008/05/jquery-os-seletores-selectors/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/05/jquery-os-seletores-selectors/#comments</comments>
		<pubDate>Mon, 19 May 2008 16:50:06 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[ Pai]]></category>
		<category><![CDATA[Filhos]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Selectores]]></category>
		<category><![CDATA[Seletores]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[TagName]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=19</guid>
		<description><![CDATA[Camaradas,
Seguindo uma ordem mais amigável sobre o assunto, neste artigo vou falar sobre o seletores(Selectors) do jQuery, o responsável pelo funcionamento das requisições. Como disse no artigo passado fazer uma requisição objetiva resultará em um melhor resultado, pra cada caso você poderá escrever diversos algoritmos para obter o mesmo resultado.
Antes de começarmos, complementando as informações [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Camaradas,</strong></p>
<p>Seguindo uma ordem mais amigável sobre o assunto, neste artigo vou falar sobre o seletores(Selectors) do jQuery, o responsável pelo funcionamento das requisições. Como disse no <a href="http://gsaraiva.projects.pro.br/?p=11">artigo passado</a> fazer uma requisição objetiva resultará em um melhor resultado, pra cada caso você poderá escrever diversos algoritmos para obter o mesmo resultado.</p>
<p>Antes de começarmos, complementando as informações do artigo anterior, preciso lembrar-lhes que HTML é escrito com uma hierarquia, ou seja, os objetos podem ter Pai e podem ter Filhos. Basicamente a única TAG que não tem Pai é a < HTML >, pois ela inicia o documento HTML. Mas então, seguindo esse raciocínio podemos entender que as possibilidades de requisições objetivas são grandes, não dependendo apenas das propriedades que a TAG possuí.</p>
<p>Um exemplo comum, os valiosos formulários:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;POST&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;CadNews&quot;</span> <span style="color: #000066;">onSubmit</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return CheckForm()&quot;</span>&gt;</span></li><li> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UserName&quot;</span>&gt;</span>Seu nome<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UserName&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span>&gt;</span></li><li> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UserEmail&quot;</span>&gt;</span>Seu e-mail<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UserEmail&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span>&gt;</span></li><li> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Cadastrar&quot;</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;CheckForm <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;UserName <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form#CadNews input#UserName&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;UserEmail <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form#CadNews input#UserEmail&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>UserName <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>UserEmail <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Dados incompletos&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Aqui fazemos a checagem dos campos &#8220;Seu nome&#8221; e &#8220;Seu -email&#8221; para que se eles contiverem um valor diferente de vazio o form poderá ser submetido, caso contrário o form não efetuará processo algum além do usuário visualizar a mensagem: &#8220;Dados incompletos&#8221;.</p>
<p>Veja que utilizamos alem do ID da Tag, fazemos uso também da estrutura, ou seja, além de procurarmos pelo ID, indicado pelo #, fazemos uso também da idenficação sequêncial, primeiro achamos o Form com o ID = CadNews e depois procuramos Input ID = UserName.</p>
<p>Agora entendendo um pouco sobre os 3 Seletores (Selectors):</p>
<h5>Seletor de TagName [Ex: jQuery("DIV")]</h5>
<dl>
O Seletor de TagName consiste em definir o tipo de requisição como busca por Elementos que são da Tag especificada. Exemplo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>Texto<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Texto alterado.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Então basicamente ele atua no TagName do elemento HTML.
</dl>
<h5>Seletor de ID [Ex: jQuery("#Status")]</h5>
<dl>
O Seletor de ID consiste em definir o tipo de requisição como busca por Elementos que contenham o ID igual ao especificado. Exemplo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Status&quot;</span>&gt;</span>Não modificado.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#Status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Modificado.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Então basicamente ele atua nos Elementos que informam o ID, os que não informam não têm possibilidade de entrar no resultado da requisição por esse Seletor.
</dl>
<h5>Seletor de Classe [Ex: jQuery(".InputText")]</h5>
<dl>
O Seletor de Classe consiste em definir o tipo de requisição como busca por Elementos que são da classe informada. Exemplo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;InputText&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Date&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Sem valor definido&quot;</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.InputText&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;18-05-2008&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Basicamente ele atua nos Elementos que pertencem a classe da requisição. Lembrando que um Elemento pode pertencer a várias classes.
</dl>
<p>Agora uma pequena notação:</p>
<p>Não é de hoje que, pra quem já desenvolve soluções para internet sabem, em CSS podemos selecionar todos os elementos atravez do * (asterisco), pois bem, no jQuery não é diferente. Como você devem ter notado ele atua atravez de requisições que por sua vez usa os seletores para os filtros, e que esse 3 seletores são identicos aos utilizados no CSS. O * (asterisco) não foge a regra do CSS, o uso é idéntico. Exemplo:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div *&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Filho&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
O resultado será o preenchimento com a palavra &#8220;Filho&#8221; de todos os elementos pertencentes ao DIV.</p>
<p>Espero que tenham entendido essa parte, pois ela é de suma importância no bom entendimento e utilização do jQuery.</p>
<blockquote><p>
Próximo artigo:</p>
<li>Criando códigos facilitadores</li>
</blockquote>
<blockquote><p>
Artigos jQuery relacionados:</p>
<li><a href="http://gsaraiva.projects.pro.br/?p=11">Como iniciar a utilização do jQuery</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=21">Tudo que você precisa é o link</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=19">Os Seletores (Selectors)</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=97">Criando códigos facilitadores</a></li>
</blockquote>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/05/jquery-os-seletores-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Tudo que você precisa é o link</title>
		<link>http://projects.pro.br/gsaraiva/2008/05/jquery-tudo-que-voce-precisa-e-o-link/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/05/jquery-tudo-que-voce-precisa-e-o-link/#comments</comments>
		<pubDate>Sat, 17 May 2008 14:27:49 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Dimensions]]></category>
		<category><![CDATA[FlyDOM]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Easing]]></category>
		<category><![CDATA[jQuery.Animator]]></category>
		<category><![CDATA[jQuery.Colors]]></category>
		<category><![CDATA[jQuery.CssRule]]></category>
		<category><![CDATA[jQuery.DynFace]]></category>
		<category><![CDATA[TAGs]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=21</guid>
		<description><![CDATA[Camaradas,
Como tenho visto muita gente com problemas em relação a compatibilidade e outras coisas,
decidi manter a minha estrutura em relação ao jQuery fixa, como vai funcionar?
Vou manter o link baixo fixo:
&#60;script type=&#34;text/javascript&#34; src=&#34;http://projects.pro.br/javascripts/jquery/&#34;&#62;&#60;/script&#62;
Então pra você que está tendo dificuldade com o jQuery, você precisa somente de inserir esse código html na sua página e esquecer [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Camaradas,</strong></p>
<p>Como tenho visto muita gente com problemas em relação a compatibilidade e outras coisas,<br />
decidi manter a minha estrutura em relação ao jQuery fixa, como vai funcionar?<br />
Vou manter o link baixo fixo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://projects.pro.br/javascripts/jquery/&quot;</span>&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Então pra você que está tendo dificuldade com o jQuery, você precisa somente de inserir esse código html na sua página e esquecer que ele existe, é só utilizar e ser feliz.</p>
<p>Um exemplo:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://projects.pro.br/javascripts/jquery/&quot;</span>&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;JavaScript&quot;</span>&gt;</span></li></ol></div></pre><!--END_DEVFMTCODE--><!--DEVFMTCODE--><pre class="devcodeblock" title="Javascript"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #339933;">&lt;!--</span></li><li>&nbsp;&nbsp;jQuery<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></li><li>&nbsp;&nbsp;&nbsp;&nbsp;background <span style="color: #339933;">=</span> $.<span style="color: #660066;">tocolor</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#f99&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$.<span style="color: #660066;">cssRule</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #3366CC;">&quot;{background:&quot;</span> <span style="color: #339933;">+</span> background.<span style="color: #660066;">hexHTML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;}&quot;</span><span style="color: #339933;">,</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;span&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">,</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;.italic&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;font-style&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;italic&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;span&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;position&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;absolute&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;span&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;50%&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #006600; font-style: italic;">//--&gt;</li></ol></div></pre><!--END_DEVFMTCODE--><!--DEVFMTCODE--><pre class="devcodeblock" title="HTML"><div class="devcodeoverflow"><ol><li></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>texto <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;italic&quot;</span>&gt;</span>italic<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;italic&quot;</span>&gt;</span>no italic<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></li><li><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></li><li></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Veja que este código vai funcionar utilizando o jquery que estou disponibilizando.</p>
<p>Vou mante-lo atualizado, e funcional, sempre, pois utilizo ele em outros lugares. </p>
<p>Como este link possui além do jQuery alguns plugins utéis para mim e possivelmente para muitos de vocês, deixei uma forma para que você possa filtrar os plugins carregados:</p>
<p>A lista de plugins (Vou manter essa lista sempre em atualizada)</p>
<ol>
<li><strong>flydom</strong><br />
Carrega o plugin FlyDOM.</li>
<li><strong>dimensions</strong><br />
Carrrega o plugin dimensions.</li>
<li><strong>easing</strong><br />
Carrrega o plugin jQuery Easing.</li>
<li><strong>cssRule</strong><br />
Carrrega o plugin jQuery.CssRule.</li>
<li><strong>colors</strong><br />
Carrrega o plugin jQuery.Colors.</li>
<li><strong>animator</strong><br />
Carrrega o plugin jQuery.Animator.</li>
<li><strong>dynface</strong><br />
Carrrega o plugin jQuery.dynface.</li>
</ol>
<p>Então para você obter o jQuery e algum desses plugins, a sintax abaixo podera ser alterada a seu modo:<br />
<code>http://projects.pro.br/javascripts/jquery/?cssRule=1&#038;colors=1</code><br />
Essa sintax carrega o jQuery e os plugins jQuery.CssRule e o jQuery.Colors.</p>
<p>Outra maneira de não se perder com o passar do tempo é:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><ol><li>http:<span style="color: #000000; font-weight: bold;">//</span>projects.pro.br<span style="color: #000000; font-weight: bold;">/</span>javascripts<span style="color: #000000; font-weight: bold;">/</span>jquery<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">flydom</span>=0<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">dimensions</span>=0<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">rule</span>=0<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">easing</span>=0<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">cssRule</span>=1<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">colors</span>=1<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">animator</span>=0<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">dynface</span>=<span style="color: #000000;">0</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Essa sintax faz a mesma coisa da anterior, mas mantem os plugins que você tem disponíveis para uso mas sem carrega-los, sendo indicado por <strong>=0</strong>.</p>
<blockquote><p>
Artigos jQuery relacionados:</p>
<li><a href="http://gsaraiva.projects.pro.br/?p=11">Como iniciar a utilização do jQuery</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=21">Tudo que você precisa é o link</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=19">Os Seletores (Selectors)</a></li>
<li><a href="http://gsaraiva.projects.pro.br/?p=97">Criando códigos facilitadores</a></li>
</blockquote>
<p>Abraços a todos.</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/05/jquery-tudo-que-voce-precisa-e-o-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
