<?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>Trinidev &#187; jQuery</title>
	<atom:link href="http://www.trinidev.fr/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trinidev.fr</link>
	<description>Revue de toutes les technos du Web... et d&#039;ailleurs</description>
	<lastBuildDate>Fri, 30 Sep 2011 16:48:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jQuery chez Google&#8230;</title>
		<link>http://www.trinidev.fr/2009/08/jquery-chez-google/</link>
		<comments>http://www.trinidev.fr/2009/08/jquery-chez-google/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 18:10:06 +0000</pubDate>
		<dc:creator>Alban Jubert</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Librairie]]></category>

		<guid isPermaLink="false">http://www.trinidev.fr/?p=931</guid>
		<description><![CDATA[
Depuis le 20 août dernier, la librairie javascript jQuery est désormais uniquement &#171;&#160;hébergée&#160;&#187; sur Google Ajax Libraries API  au lieu du site officiel jQuery.
En conséquence, les scripts résidents sur code.jquery.com sont maintenant redirigés vers ajax.googleapis.com. Si vous utilisiez les services de code.jquery.com, c&#8217;est une bonne idée de migrer à présent.
Rappelons que ce service de [...]]]></description>
			<content:encoded><![CDATA[<div class="alignleft" style="background:#39414a;padding:5px;float:left;"><img title="jQuery" src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif" alt="" width="215" height="53" /></div>
<p>Depuis le 20 août dernier, la librairie javascript <strong><a href="http://blog.jquery.com/" target="_blank">jQuery</a></strong> est désormais uniquement &laquo;&nbsp;hébergée&nbsp;&raquo; sur <strong>Google Ajax Libraries API </strong> au lieu du site officiel jQuery.</p>
<p>En conséquence, les scripts résidents sur <strong>code.jquery.com</strong> sont maintenant redirigés vers <strong>ajax.googleapis.com</strong>. Si vous utilisiez les services de code.jquery.com, c&#8217;est une bonne idée de migrer à présent.</p>
<p>Rappelons que ce service de Google mets à la disposition des développeurs (et des navigateurs du monde entier) la grande majorité des librairies ajax open-sources (Prototype, Mootools, YUI, Dojo and co).</p>
<p>L&#8217;intérêt d&#8217;un tel service est que vous bénéficiez de la puissance de feu de infrastructures réseau du géant avec une rapidité de service impressionnante (et vous sollicitez moins votre propre serveur) sans compté sur des versions continuellement à jour et &laquo;&nbsp;minimisées&nbsp;&raquo; afin d&#8217;optimiser un peu plus les temps de chargement pour vos utilisateurs.</p>
<p>Pour plus d&#8217;infos, allez donc faire un petit tour <a href="http://code.google.com/intl/fr-FR/apis/ajaxlibs/" target="_blank">ici</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.trinidev.fr%2F2009%2F08%2Fjquery-chez-google%2F&amp;title=jQuery%20chez%20Google%26%238230%3B" id="wpa2a_2">Partager/Sauvegarder</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.trinidev.fr/2009/08/jquery-chez-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vérifier les modifications de formulaires avec jQuery</title>
		<link>http://www.trinidev.fr/2009/03/verifier-les-modifications-de-formulaires-avec-jquery/</link>
		<comments>http://www.trinidev.fr/2009/03/verifier-les-modifications-de-formulaires-avec-jquery/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 13:55:06 +0000</pubDate>
		<dc:creator>Alban Jubert</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Astuce]]></category>
		<category><![CDATA[Formulaire]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://www.trinidev.fr/?p=386</guid>
		<description><![CDATA[Vous souhaitez alerter vos utilisateurs s&#8217;ils ont modifié le contenu d&#8217;un formulaire et qu&#8217;ils s&#8217;apprêtent à quitter la page par l&#8217;intermédiaire d&#8217;un lien sans avoir validé ?
Un petit javascript permet de facilement accomplir cela.

?View Code JAVASCRIPT1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
jQuery&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
	$&#40;window&#41;.attr&#40;&#34;isDirty&#34;, false&#41;;
	$&#40;&#34;:input&#34;&#41;.bind&#40;&#34;change&#34;, function&#40;event&#41; &#123;
				if &#40;event.target.value != event.target.defaultValue&#41; &#123;
					$&#40;window&#41;.attr&#40;&#34;isDirty&#34;, true&#41;;
				&#125;
			&#125;&#41;;
	$&#40;&#34;:checkbox,:radio&#34;&#41;.bind&#40;&#34;click&#34;, function&#40;event&#41; &#123;
				if &#40;event.target.checked != event.target.defaultChecked&#41; &#123;
					$&#40;window&#41;.attr&#40;&#34;isDirty&#34;, true&#41;;
				&#125;
			&#125;&#41;;
	$&#40;&#34;a, button&#34;&#41;.bind&#40;&#34;click&#34;, function&#40;event&#41; &#123;
		if &#40;window.isDirty&#41; &#123;
			return confirm&#40;&#34;Etes-vous sûre [...]]]></description>
			<content:encoded><![CDATA[<p>Vous souhaitez alerter vos utilisateurs s&#8217;ils ont modifié le contenu d&#8217;un formulaire et qu&#8217;ils s&#8217;apprêtent à quitter la page par l&#8217;intermédiaire d&#8217;un lien sans avoir validé ?</p>
<p>Un petit javascript permet de facilement accomplir cela.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p386code2'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3862"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code" id="p386code2"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;isDirty&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;change&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">target</span>.<span style="color: #660066;">value</span> <span style="color: #339933;">!=</span> event.<span style="color: #660066;">target</span>.<span style="color: #660066;">defaultValue</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;isDirty&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:checkbox,:radio&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">target</span>.<span style="color: #660066;">checked</span> <span style="color: #339933;">!=</span> event.<span style="color: #660066;">target</span>.<span style="color: #660066;">defaultChecked</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;isDirty&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a, button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">isDirty</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066;">confirm</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Etes-vous sûre de vouloir quitter cette page sans enregistrer ?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>L&#8217;astuce consiste à créer un attribut <code>isDirty</code> attaché à la page et à en changer l&#8217;état dès qu&#8217;une valeur de champ a été modifiée. Au chargement de la page, on attache des listeners aux champs, checkbox et boutons radio qui vont scruter leurs éventuelles modifications. Lorsque l&#8217;utilisateur clique sur un lien, on vérifie juste la valeur de cet état pour déclencher une demande de confirmation le cas échéant (qui dans le cas négatif, interrompt l&#8217;événement de changement de page).</p>
<p>On peut facilement adapter ce code à Prototype ou à MooTools afin de réaliser la même chose avec ses librairies.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.trinidev.fr%2F2009%2F03%2Fverifier-les-modifications-de-formulaires-avec-jquery%2F&amp;title=V%C3%A9rifier%20les%20modifications%20de%20formulaires%20avec%20jQuery" id="wpa2a_4">Partager/Sauvegarder</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.trinidev.fr/2009/03/verifier-les-modifications-de-formulaires-avec-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.3.2</title>
		<link>http://www.trinidev.fr/2009/02/jquery-132/</link>
		<comments>http://www.trinidev.fr/2009/02/jquery-132/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 10:14:26 +0000</pubDate>
		<dc:creator>Alban Jubert</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Librairie]]></category>
		<category><![CDATA[Mise à jour]]></category>
		<category><![CDATA[Performances]]></category>

		<guid isPermaLink="false">http://www.trinidev.fr/?p=333</guid>
		<description><![CDATA[

La dernière mouture de la célèbre librairie Javascript est disponible ici.
Au menu :

L&#8217;ordre de retour des éléments sélectionnés sont maintenant dans l&#8217;ordre d&#8217;apparition dans le document
L&#8217;excellente fonction .live() permet maintenant d&#8217;éviter la propagation des événements
Les fonction de manipulation du Dom comme .appentTo() retournent les éléments tels qu&#8217;ils ont été insérés par les appels de fonctions chainés.

Mais surtout, c&#8217;est un [...]]]></description>
			<content:encoded><![CDATA[<div style="background:#39414a;padding:5px;float:left;"><img class="alignnone" title="jQuery" src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif" alt="" width="215" height="53" /></div>
<p><br style="clear: both;" /></p>
<p>La dernière mouture de la célèbre librairie Javascript est disponible <a href="http://docs.jquery.com/Release:jQuery_1.3.2" target="_blank">ici</a>.</p>
<p>Au menu :</p>
<ul>
<li>L&#8217;ordre de retour des éléments sélectionnés sont maintenant dans l&#8217;ordre d&#8217;apparition dans le document</li>
<li>L&#8217;excellente fonction .live() permet maintenant d&#8217;éviter la propagation des événements</li>
<li>Les fonction de manipulation du Dom comme .appentTo() retournent les éléments tels qu&#8217;ils ont été insérés par les appels de fonctions chainés.</li>
</ul>
<p>Mais surtout, c&#8217;est un énorme travail d&#8217;optimisation qui semble avoir été accompli. Pour les détracteurs de jQuery dont l&#8217;argument principal était la lenteur, cela devrait remettre les pendules à l&#8217;heure.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.trinidev.fr%2F2009%2F02%2Fjquery-132%2F&amp;title=jQuery%201.3.2" id="wpa2a_6">Partager/Sauvegarder</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.trinidev.fr/2009/02/jquery-132/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.trinidev.fr @ 2012-02-17 16:31:34 by W3 Total Cache -->
