<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2frenchfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Creamama, developpeur web, Spip, JQuery à Grenoble</title><link>http://www.creamama.fr/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Creamama-Grenoble-web" /><description>Creamama.fr est un blog de développement web. Vous y trouverez des ressources pour JQuery, Spip, Php, MySql, etc. Du html5 au css3, Creamama.fr concentre sa veille sur les nouvelles technologies.</description><language>fr</language><image><link>http://www.creamama.fr/</link><url>http://www.creamama.fr/local/cache-vignettes/L144xH50/siteon0-6c6be.png</url><title>Creamama, developpeur web, Spip, JQuery à Grenoble</title><width>144</width><height>50</height></image><generator>SPIP - www.spip.net</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Creamama-Grenoble-web" /><feedburner:info uri="creamama-grenoble-web" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><feedburner:emailServiceId>Creamama-Grenoble-web</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/content?lg=fr&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/bn/intatm_fr_1.gif">Subscribe with Mon Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Creamama-Grenoble-web" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FCreamama-Grenoble-web" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item><title>Afficher le titre/lien d'un article dans la langue courante du site Spip</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/2aYA1DDRFHc/Afficher-le-titre-lien-d-un.html</link><category>Spip</category><category>multilinguisme</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Wed, 20 Jun 2012 01:29:11 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/Afficher-le-titre-lien-d-un.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Vous avez un site multilingue, et vous souhaitez afficher un lien vers les mentions légales. Avec le <strong>plugin page</strong>, on peut facilement créer des pages indépendantes ainsi que leurs traductions. Nous avons donc notre article "Mentions Légales" avec l'id 15. Et nous avons 2 traductions, des articles de types pages avec les IDs 16 et 17.</p> <p>On aurait pu se contenter de faire comme ça :</p>
<div style='text-align: left;' class='spip_code' dir='ltr'><code><BOUCLE_d(ARTICLES){id_article IN 15, 16, 17}{lang}><br /> <a rel="nofollow" href="#URL_ARTICLE">#TITRE</a> |<br /> </BOUCLE_d></code></div>
<p>Ce code est parfait si vous avez un nombre définit de traduction et que vous connaissez les IDs de toutes les traductions au moment où vous écrivez votre squelette.</p> <p>En revanche, si au moment où vous faites vos squelettes, il n'y a qu'une partie des traductions qui est publiée, vous serez obligé de retourner modifier votre squelettes à chaque nouvelle traduction.</p> <p>Ci-dessous, une solution pour chercher toutes les traductions d'un article et afficher le bon en fonction du contexte de langue :</p> <div style='text-align: left;' class='spip_code' dir='ltr'><code>#SET{article, #ARRAY}<br /> <BOUCLE_m(ARTICLES){id_article=15}><br /> <BOUCLE_a(ARTICLES){traduction}><br /> #SET{article, #GET{article}|push{#ID_ARTICLE}}<br /> </BOUCLE_a><br /> </BOUCLE_m><br /> <br /> <BOUCLE_d(ARTICLES){id_article IN #GET{article}}{lang}><br /> <a rel="nofollow" href="#URL_ARTICLE">#TITRE</a> |<br /> </BOUCLE_d></code></div>
<p>La première boucle (BOUCLE_m) fournit un contexte d'article pour la seconde boucle (BOUCLE_a) qui va lister toutes les traductions de l'article 15, lui compris. On génère dans cette dernière un tableau contenant les IDs de l'article 15, et de ses traductions (donc 16 et 17 si vous avez suivit).</p> <p>Enfin, la dernière boucle (BOUCLE_d) va parcourir le tableau généré précédemment, et retourner l'article dans la bonne langue grâce au critère <i>lang</i>.</p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=2aYA1DDRFHc:sIaNzEHIoTc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=2aYA1DDRFHc:sIaNzEHIoTc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=2aYA1DDRFHc:sIaNzEHIoTc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=2aYA1DDRFHc:sIaNzEHIoTc:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/2aYA1DDRFHc" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Une boucle qui va permettre de retourner facilement le lien et/ou le titre d'un article dans la langue actuelle du site.&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Astuces-Spip-.html" rel="directory"&gt;Astuces Spip&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-Spip-+.html" rel="tag"&gt;Spip&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-multilinguisme-+.html" rel="tag"&gt;multilinguisme&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/Afficher-le-titre-lien-d-un.html</feedburner:origLink></item><item><title>tutoriel html5 History</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/TI3EVkWjYSo/tutoriel-html5-History.html</link><category>html5</category><category>history</category><category>api</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Wed, 26 Oct 2011 05:28:13 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/tutoriel-html5-History.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p><span class='spip_document_131 spip_documents spip_documents_left' style='float:left; width:200px;'>
<img src='http://www.creamama.fr/local/cache-vignettes/L200xH200/200px-HTML5_Badge-svg-edfa1.png' width='200' height='200' alt="" style='height:200px;width:200px;' /></span></p> <h3 class="spip">Théorie</h3>
<p><strong>La méthode pushState()</strong> :</p> <p>La méthode pushState ajoute une entrée dans l'historique de votre navigateur.</p> <p>pushState prend trois paramètres : stateObj, title et url</p> <ul class="spip"><li> <strong>stateObj</strong> : Un objet javascript qui sera associé à la nouvelle entrée dans l'historique. Il peut contenir n'importe quelle donnée qui peut être sérialisée. </li><li> <strong>title</strong> : Un paramètre pour l'instant ignoré par firefox. Il est pour l'instant préférable de mettre une chaine vide, pour éviter tous conflits futur. Vous pouvez cependant y stocker un titre court de l'état vers lequel vous allez.</li><li> <strong>url</strong> : Stocke l'url vers laquelle vous allez. Elle ne sera appelée que lorsque l'internaute fera appel à cette entrée. L'url peut être en relative.</li></ul>
<p><strong>L'évenement onpopstate()</strong></p> <p>Un évènement popstate est envoyé chaque fois qu'il y a un changement dans l'historique actif.</p> <p><strong>La méthode replaceState()</strong></p> <p>Cette méthode fonctionne exactement comme la méthode pushState. Simplement, au lieu de créer une nouvelle entrée dans la pile de l'historique, elle modifie l'entrée actuelle.</p> <h3 class="spip">Pratique</h3>
<p>Imaginons un exemple simple. Une page d'accueil, et trois pages satellite.</p> <p>Nous avons donc :</p> <ul class="spip"><li> index.php</li><li> page1.html</li><li> page2.html</li><li> page3.html</li></ul>
<p>On veux charger le contenu des pages en ajax. On veut que lorsqu'un nouveau contenu est chargé, il soit ajouté au dessus de la pile de l'historique. On veut pouvoir consulter les différentes pages depuis n'importe quelle « referer ».</p> <p>Coté javascript, on arrive à ça :</p> <div class="coloration_code"><div class="spip_javascript code">$<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;">{</span><br /> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#principal a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> <span style="color: #006600; font-style: italic;">//On met l'élément courant dans une variable, pour améliorer les performances</span><br /> <span style="color: #003366; font-weight: bold;">var</span> $t <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//On appelle la fonction qui fera la requete en ajax, et gérera la pile de l'historique</span><br /> load_content<span style="color: #009900;">&#40;</span>$t.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>$t.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//On ne suit pas le lien</span><br /> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> load_content<span style="color: #009900;">&#40;</span>title<span style="color: #339933;">,</span>url<span style="color: #339933;">,</span>skipHistory<span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> $.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> <span style="color: #006600; font-style: italic;">//On met à jour le itre de la page</span><br /> document.<span style="color: #660066;">title</span> <span style="color: #339933;">=</span> title<span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//On défini l'objet d'état</span><br /> <span style="color: #003366; font-weight: bold;">var</span> stateObj <span style="color: #339933;">=</span> <span style="color: #009900;">{</span><br /> title<span style="color: #339933;">:</span> title<span style="color: #339933;">,</span><br /> url<span style="color: #339933;">:</span> url<br /> <span style="color: #009900;">}</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//Si la variable skipHistory est à false, on lance la méthode pushstate</span><br /> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>skipHistory<span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> <span style="color: #006600; font-style: italic;">//On vérifie que la fonction pushState est bien définie</span><br /> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window.<span style="color: #660066;">history</span>.<span style="color: #660066;">pushState</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'function'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> window.<span style="color: #660066;">history</span>.<span style="color: #660066;">pushState</span><span style="color: #009900;">&#40;</span>stateObj<span style="color: #339933;">,</span>title<span style="color: #339933;">,</span>url<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span><br /> <span style="color: #009900;">}</span><br /> <span style="color: #006600; font-style: italic;">//On charge le contenu</span><br /> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#contenu'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <br /> <br /> <br />
<span style="color: #009900;">}</span><br />
<span style="color: #006600; font-style: italic;">//On détecte les événement sur la pile de l'historique</span><br />
window.<span style="color: #660066;">onpopstate</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;">{</span><br /> <span style="color: #006600; font-style: italic;">//Si event.state est définie (c'est à dire que la page précédente fait partie de l'historique courant), on charge le contenu</span><br /> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">state</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> load_content<span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">state</span>.<span style="color: #660066;">title</span><span style="color: #339933;">,</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">pathname</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><br /> <span style="color: #009900;">}</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">{</span><br /> <span style="color: #006600; font-style: italic;">//Si event.state n'est pas définie, on créer un nouvel objet d'état</span><br /> <span style="color: #003366; font-weight: bold;">var</span> stateObj <span style="color: #339933;">=</span> <span style="color: #009900;">{</span><br /> title<span style="color: #339933;">:</span> document.<span style="color: #660066;">title</span><span style="color: #339933;">,</span><br /> url<span style="color: #339933;">:</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">pathname</span> <br /> <span style="color: #009900;">}</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//On modifie l'entrée actuelle</span><br /> window.<span style="color: #660066;">history</span>.<span style="color: #660066;">replaceState</span><span style="color: #009900;">&#40;</span>stateObj<span style="color: #339933;">,</span>document.<span style="color: #660066;">title</span><span style="color: #339933;">,</span>window.<span style="color: #660066;">location</span>.<span style="color: #660066;">pathname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span><br />
<span style="color: #009900;">}</span></div><div class='code_download' style='text-align: right;'> <a href='http://www.creamama.fr/local/cache-code/b3cea9493b9b34adad8c62889af61268.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'>Télécharger</a></div></div>
<p>J'ai essayé de documenter au mieux le code. Vous devriez pouvoir comprendre sans trop de difficulté.</p> <p>Ensuite, avec un peu de php, on peut facilement savoir si on charge la page en ajax ou non, graçe à la variable $_SERVER['HTTP_X_REQUESTED_WITH']</p> <div class="coloration_code"><div class="spip_php code"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_REQUESTED_WITH'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&&</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_REQUESTED_WITH'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">"XMLHttpRequest"</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> <span style="color: #666666; font-style: italic;">//Si on est en Ajax</span><br />
<span style="color: #009900;">}</span><span style="color: #b1b100;">else</span><span style="color: #009900;">{</span><br /> <span style="color: #666666; font-style: italic;">//Si on n'est pas en Ajax</span><br />
<span style="color: #009900;">}</span></div><div class='code_download' style='text-align: right;'> <a href='http://www.creamama.fr/local/cache-code/3266c7ae2ffd8a165807610afc9dbe81.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'>Télécharger</a></div></div>
<p>Ce qui nous permet de charger l'entête et le pied de page, uniquement quand on n'est pas en ajax.</p> <p>Bien sur, cette api ne fonctionne que pour les navigateurs interprétant le html5. Donc à priori, exit IE et compagnie. Il existe cependant une solution. Un <strong>plugin JQuery</strong> a été développé dans le but de rendre cette api compatible avec tous (ou presque) les navigateurs. Vous le trouverez là : <a href="http://plugins.jquery.com/project/history-js" class='spip_out' rel='external'>http://plugins.jquery.com/project/history-js</a>.</p> <p><strong>Démo :</strong></p> <p><a href="http://www.demo.creamama.fr/html5-History/" class='spip_out' rel='external'>Démo html5 History</a></p> <p><strong>Télécharger la démo : </strong></p>
<dl class='spip_document_130 spip_documents spip_documents_center'> <dt> <a href="http://www.creamama.fr/IMG/zip/demo-html5-History.zip" title='Zip - 58.4 ko' type="application/zip"> <img src='http://www.creamama.fr/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 58.4 ko' style='height:52px;width:52px;' /> </a> </dt> <dd class='spip_doc_descriptif' style='width:120px;'>démo html5 History</dd> <!-- <dt class='spip_doc_titre' style='width:120px;'><strong>démo html5 History</strong></dt> --> <!-- -->
</dl></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=TI3EVkWjYSo:lM_54GviTIw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=TI3EVkWjYSo:lM_54GviTIw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=TI3EVkWjYSo:lM_54GviTIw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=TI3EVkWjYSo:lM_54GviTIw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/TI3EVkWjYSo" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Un billet pour comprendre comment fonctionne l'api history.&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Cote-Blog-.html" rel="directory"&gt;2. Coté Blog&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-html5-+.html" rel="tag"&gt;html5&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-history-+.html" rel="tag"&gt;history&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-api-+.html" rel="tag"&gt;api&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/tutoriel-html5-History.html</feedburner:origLink></item><item><title>Formulaire html5</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/MR5bn-IyqVc/Formulaire-html5.html</link><category>html5</category><category>formulaire</category><category>Tuto</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Tue, 30 Aug 2011 05:29:51 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/Formulaire-html5.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Ahhh, les formulaires... ... Entre la mise en forme et le contrôle des données saisies, ça n'a jamais été l'élément (x)html le plus simple à mettre en place. Il en faut des lignes de script pour contrôler les données saisies par l'internaute. Du simple numéro de téléphone, à l'email on arrive à de jolies expressions régulières ! Que du bonheur ! Et c'est toujours amusant de bien intégrer un message pour avertir l'internaute qu'il a saisit la ville dans le champ code postal.</p> <p>Rassurez-vous, html5 va permettre de se simplifier un peu la vie. Avec les versions actuelles d'(x)html, le nombre de balise différentes est (très) limité. Un input peut être de type texte, file ou password. Avec la balise textarea, on a la famille au complet(ou presque, mais ce n'est pas ce qui nous intéresse ici).</p> <p>Les formulaires html5 permettent d'être un peu plus précis. Ci-dessous, les différents types de balise input disponibles :</p> <ul class="spip"><li> email</li><li> tel</li><li> url</li><li> date</li><li> number</li><li> range</li><li> color</li><li> search</li></ul>
<p><strong>Formulaire html5 : email, tel et url</strong></p> <p>Pour les types email, tel et url html5 propose des expressions régulières natives, vous évitant ainsi de surcharger vos pages de script de contrôle. Pour les développeurs qui ne veulent pas se contenter de cette solution, il est possible d'insérer sa propre exression régulière avec l'attribut pattern. Exemple :</p> <div style='text-align: left;' class='spip_code' dir='ltr'><code html><input type="text" pattern="votre expression régulière" /></code></div>
<p>Et comme ils sont généreux, ils proposent également pour les mobiles, des claviers virtuels adaptés. Par exemple un clavier numérique pour les numéros de téléphone, un clavier avec l'@ pour les email, etc.</p> <p><strong>Formulaire html5 : date</strong></p> <p>Le type date est là pour simplifier la saisie de date. Pour l'instant le navigateur Opéra est le plus en avance sur le sujet, et propose un calendrier complet. Il existe plusieurs déclinaisons possible pour ce type :</p> <ul class="spip"><li> month : pour le mois</li><li> week : pour la semaine</li><li> time : pour l'heure uniquement</li><li> date pour la date uniquement</li><li> datetime-local : pour le jour et j'heure, sans décalage horaire</li><li> datetime : pour le jour et l'heure avec le décalage horaire
<span class='spip_document_128 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L236xH211/calendrier-0a30e.jpg' width='236' height='211' alt="" style='height:211px;width:236px;' /></span></li></ul>
<p><strong>Formulaire html5 : number et range</strong></p> <p>Il est à présent possible d'utiliser un slider, ou les deux petits boutons intégrer au champ pour modifier sa valeur. On peut spécifier pour ces deux champs, un valeur minimale, une maximale, un pas et une valeur de départ.
<span class='spip_document_126 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L138xH29/range-5c10c.jpg' width='138' height='29' alt="" style='height:29px;width:138px;' /></span><span class='spip_document_127 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L163xH29/number-815ec.jpg' width='163' height='29' alt="" style='height:29px;width:163px;' /></span></p> <p><strong>Formulaire html5 : Color</strong></p> <p>On peut avoir différents nuancier. Par défaut la valeur est #000000. Pour l'instant, le nuancier apparait seulement sur Opéra.</p> <p><strong>Formulaire html5 : search</strong></p> <p>Les inputs de type search auront un style bien à eux. En fonction des différents navigateurs et système d'exploitation, ils n'auront pas la même allure. Une petite croix permettant d'effacer la recherche. Les logiciels d'assistance proposent des raccourcis pour accéder directement au champ de recherche.</p> <p><strong>Formulaire html5 : Suggestion</strong></p> <p>Vous allez pouvoir maintenant suggérer à vos utilisateur une liste de mot. A chemin entre la liste déroulante et le champ texte classique, le nouvel élément <strong>datalist</strong> permet d'augmenter le confort utilisateur. On bénéficie également de l'autocomplétion.</p> <p><span class='spip_document_129 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L214xH103/datalist-22fcb.jpg' width='214' height='103' alt="" style='height:103px;width:214px;' /></span></p> <h3 class="spip">Formulaire html5 - Validation des données</h3>
<p>Deux attributs <strong>invalid</strong> et <strong>required</strong> vous permettrons d'informer l'utilisateur de l'invalidité ou d'indiquer que le champ est requis. Chaque navigation affichera différemment ces messages. Vous pouvez cependant créer vos propres styles avec les pseudos class :invalid et :required</p> <p>On peut toutefois désactiver cette validation native, en ajoutant l'attribut <strong>novalidate</strong> à la balise form.</p> <h3 class="spip">Formulaire html5 : Nouveaux attributs</h3>
<p><strong>pattern</strong> : Cet attribut permet d'appliquer une expression régulière à un champ donner. La validation se fait automatiquement quand l'utilisateur modifie le contenu du champ.</p> <p><strong>autofocus</strong> : Permet de donner le focus à un élément de formulaire au chargement de la page. Un bon exemple d'utilisation serait de mettre l'autofocus sur le champ login d'une page d'identification.</p> <p><strong>placeholder</strong> : La valeur de placeholder est le texte qui s'affiche dans le champ quand celui ci n'est pas sélectionné.</p> <p>Si l'internaute utilise un "vieux" navigateur, les différents types de champ s'afficheront comme des champs texte standard. Si vous voulez offrir à ces internautes une expérience utilisateur, il est possible, grâce à javascript de détecter le support (ou le non-support) de certain attribut, et le cas échéant, de charger des fonctions de remplacement.</p> <p>Vous trouverez une "Démo" de la mise en place d'un <a href="http://www.demo.creamama.fr/formulaire-html5/" class='spip_out' rel='external'>formulaire avec html5</a>. C'est du html5 brut, sans aucun css. C'est donc pas très joli, mais cela permet d'observer le comportement/affichage naturel de chaque élément.</p> <p>Cet article n'est pas exhaustif, alors si vous avez une remarque à faire, une correction ou un avis à proposer, n'hésitez pas à laisser un commentaire !</p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=MR5bn-IyqVc:MOiZtw9krFA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=MR5bn-IyqVc:MOiZtw9krFA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=MR5bn-IyqVc:MOiZtw9krFA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=MR5bn-IyqVc:MOiZtw9krFA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/MR5bn-IyqVc" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Un récapitulatif des nouveautés concernant les formulaires avec html5&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Cote-Blog-.html" rel="directory"&gt;2. Coté Blog&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-html5-+.html" rel="tag"&gt;html5&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-formulaire-+.html" rel="tag"&gt;formulaire&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-Tuto-+.html" rel="tag"&gt;Tuto&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/Formulaire-html5.html</feedburner:origLink></item><item><title>LightSlider : html5 JQuery Slider</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/yKxY132JQ9A/LightSlider-html5-JQuery-Slider.html</link><category>jquery</category><category>plugin</category><category>html5</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Wed, 24 Aug 2011 06:32:28 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/LightSlider-html5-JQuery-Slider.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Voilà un petit slider construit avec html5 et JQuery. Très sobre et très simple, ce slider se veut léger. Le plugin en version compressé pèse un poil plus d'1ko.</p> <p><span class='spip_document_116 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH411/lightslider-0a61f.png' width='500' height='411' alt="LightSlider : html5 JQuery Slider" title="LightSlider : html5 JQuery Slider" style='height:411px;width:500px;' /></span></p> <p>Pour ce plugin j'ai utilisé les balises <figure> et <figcaption> proposés par html5. Les images de votre slider devront être dans une div conteneur, et chacune devra être ajouter de la manière suivante :</p> <div style='text-align: left;' class='spip_code' dir='ltr'><code class="html"><figure><br /> <img src="img/1.jpg" alt=""/><br /> <figcaption>Couché de soleil</figcaption><br /> </figure></code></div>
<p>La balise figure est un conteneur, regroupant l'image()<img> et sa légende(<figcaption>).</p> <p>Coté javascript/JQuery, c'est très simple. On positionne les images les unes au dessus des autres avec JQuery. De cette manière, si javascript est désactivé, on aura un affichage correct (enfin, un affichage qui me convient, en tant que développeur... :) )</p> <p>Si la div contenu à l'id #slideMe, on appelle le plugin de la manière suivante :</p>
<div class="coloration_code"><div class="spip_javascript code">$<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;">{</span><br />
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#slideMe'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lightSlider</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">}</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div><div class='code_download' style='text-align: right;'> <a href='http://www.creamama.fr/local/cache-code/ec9ebac63d650a82189aaf63c9a446b0.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'>Télécharger</a></div></div>
<p>On a juste deux options sur ce plugin :</p> <ul class="spip"><li> texteBoutonPrec : Le texte du lien pour passer à l'image précédente</li><li> texteBoutonSuiv : Le texte du lien pour passer à l'image suivante</li></ul>
<p>Pour les impatients, voilà la démo : <a href="http://www.demo.creamama.fr/lightSlider/" class='spip_out' rel='external'>http://www.demo.creamama.fr/lightSlider/</a></p> <p>Pour les plus intéressés, il reste encore quelques lignes ci-dessous :</p> <p>Je me suis intéressé au début de cette semaine à <a href="http://www.creamama.fr/html5-History-Introduction.html" class='spip_out'>html5 history</a>. Après avoir lu pas mal d'articles, de docs et en avoir compris une partie, je voulais essayer de le mettre en pratique. Ce slider est là pour ça. Il servira de base pour une démo à venir. Mais tant qu'à faire d'avoir développé ce petit slider, autant le partager :)</p> <p>Ces derniers temps, on a vu passait pas mal de slider avec des effets assez impressionnants (par exemple : <a href="http://www.creamama.fr/JQuery-ChopSlider.html" class='spip_out'>chopSlider</a>), mais du coup, beaucoup plus gourmand en ressource. L'idée de se slider, c'est de re rester sobre, simple et ultra léger.</p> <p>N'hésitez pas à le télécharger, le modifier, vous l'approprier, ou donner votre avis !</p> <dl class='spip_document_125 spip_documents spip_documents_left' style='float:left;'> <dt> <a href="http://www.creamama.fr/IMG/zip/demotelechargable.zip" title='Zip - 980.3 ko' type="application/zip"> <img src='http://www.creamama.fr/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 980.3 ko' style='height:52px;width:52px;' /> </a> </dt> <dd class='spip_doc_descriptif' style='width:120px;'>Démo lightSlider</dd> <!-- <dt class='spip_doc_titre' style='width:120px;'><strong>Démo lightSlider</strong></dt> --> <!-- -->
</dl>
<dl class='spip_document_124 spip_documents spip_documents_left' style='float:left;'> <dt> <a href="http://www.creamama.fr/IMG/zip/lightslider-min.js.zip" title='Zip - 603 octets' type="application/zip"> <img src='http://www.creamama.fr/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 603 octets' style='height:52px;width:52px;' /> </a> </dt> <dd class='spip_doc_descriptif' style='width:120px;'>script lightslider compressé</dd> <!-- <dt class='spip_doc_titre' style='width:120px;'><strong>script lightslider compressé</strong></dt> --> <!-- -->
</dl>
<dl class='spip_document_123 spip_documents spip_documents_left' style='float:left;'> <dt> <a href="http://www.creamama.fr/IMG/zip/lightslider.js.zip" title='Zip - 912 octets' type="application/zip"> <img src='http://www.creamama.fr/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 912 octets' style='height:52px;width:52px;' /> </a> </dt> <dd class='spip_doc_descriptif' style='width:120px;'>script light slider</dd> <!-- <dt class='spip_doc_titre' style='width:120px;'><strong>script light slider</strong></dt> --> <!-- -->
</dl></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=yKxY132JQ9A:srmt5bSepNQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=yKxY132JQ9A:srmt5bSepNQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=yKxY132JQ9A:srmt5bSepNQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=yKxY132JQ9A:srmt5bSepNQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/yKxY132JQ9A" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Voilà un petit slider construit sur html5, et animé graçe à un peu de JQuery.&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Trouvailles-Jquery-.html" rel="directory"&gt;Trouvailles Jquery&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-jquery-+.html" rel="tag"&gt;jquery&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-plugin-+.html" rel="tag"&gt;plugin&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-html5-+.html" rel="tag"&gt;html5&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/LightSlider-html5-JQuery-Slider.html</feedburner:origLink></item><item><title>html5 History : Introduction</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/xej3UK_rGZ4/html5-History-Introduction.html</link><category>html5</category><category>history</category><category>api</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Mon, 22 Aug 2011 02:30:00 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/html5-History-Introduction.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><h3 class="spip">Qu'est ce que « html5 History api »</h3>
<p><strong>html5 History api</strong> est une api javascript permettant de contrôler l'historique de navigation. Pour prendre un exemple simple, prenons un diaporama photo, avec des boutons suivants et précédents. Si l'internaute clique sur le bouton suivant, le diaporama va changer d'image. S'il clique ensuite sur le bouton précédent de son navigateur, c'est la page précédente qui va être chargée, et non l'image précédente du diaporama. Ceci s'explique facilement, puisque les boutons de navigation du diaporama, ne modifient pas l'historique de navigation.</p> <p><span class='spip_document_114 spip_documents spip_documents_left' style='float:left; width:256px;'>
<img src='http://www.creamama.fr/local/cache-vignettes/L256xH256/html5-65137.png' width='256' height='256' alt="logo html5" title="logo html5" style='height:256px;width:256px;' /></span>
Grâce à l'<strong>api history, on peut modifier l'historique de navigation</strong>. Et pour reprendre l'exemple ci-dessus, on peut maintenant ajouter au dessus de la pile de l'historique, la dernière image vue dans notre diaporama. On retrouvera donc bien l'image précédente en cliquant sur le bouton précédent du navigateur.</p> <p>L'<strong>api history permet aussi de modifier l'url</strong>, sans avoir à recharger la page. L'internaute possède un moyen supplémentaire de savoir à quel endroit il se trouve. On peut maintenant générer des urls uniques et cohérentes avec des contenus chargés en AJAX. Mais attention cependant, au rafraichissement de la page. Il faut prévoir dans la conception de vos sites/applications que les urls générées renvoient bien la page voulue, et non une erreur 404 ou autre.</p> <p>Dans beaucoup de sites/applications utilisant l'AJAX, on note une incohérence quasi systématique entre les urls et le contenu chargé en asynchrone. Un des objectifs de cette api est d'essayer de rétablir cette cohérence.</p> <p>Comme le montre le tableau ci-dessous, cette api est loin d'être supportée par beaucoup de navigateurs.</p> <p><span class='spip_document_115 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH200/caniuse-com_2011-8-18_14-9-54-9c6f0.png' width='500' height='200' alt="html5 history compatibilité" title="html5 history compatibilité" style='height:200px;width:500px;' /></span></p> <p>Un script javascript a été développé pour rendre html5 history compatible avec un maximum de navigateur : <a href="https://github.com/balupton/history.js" class='spip_out' rel='external'>history.js</a></p> <p>Voilà pour la théorie, j'essaie de vous faire un autre article sur la mise en pratique d'<strong>html5 hsitory</strong> dans 2/3 jours.</p> <p>Pour patienter, voici un peu de lecture sur le sujet :</p> <ul class="spip"><li> <a href="http://blog.webspecies.co.uk/2011-05-26/html5-history-api-dynamic-websites-like-never-before.html" class='spip_out' rel='external'>http://blog.webspecies.co.uk/2011-05-26/html5-history-api-dynamic-websites-like-never-before.html</a></li><li> <a href="http://diveintohtml5.org/history.html" class='spip_url spip_out' rel='nofollow external'>http://diveintohtml5.org/history.html</a></li></ul></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=xej3UK_rGZ4:7qElipsc8LU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=xej3UK_rGZ4:7qElipsc8LU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=xej3UK_rGZ4:7qElipsc8LU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=xej3UK_rGZ4:7qElipsc8LU:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/xej3UK_rGZ4" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Un petit billet d'introduction sur l'api html5 history, histoire de se mettre dans le bain, et de se faire un peu les doigts.&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Cote-Blog-.html" rel="directory"&gt;2. Coté Blog&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-html5-+.html" rel="tag"&gt;html5&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-history-+.html" rel="tag"&gt;history&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-api-+.html" rel="tag"&gt;api&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/html5-History-Introduction.html</feedburner:origLink></item><item><title>JQuery captcha : Drag and Drop</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/IghJhGQTJYw/JQuery-captcha-Drag-and-Drop.html</link><category>jquery</category><category>plugin</category><category>captcha</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Fri, 19 Aug 2011 04:30:00 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/JQuery-captcha-Drag-and-Drop.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Un <strong>captcha en JQuery</strong> où il faut glisser / déposer une image pour valider le formulaire. Vous connaissez tous le principe du captcha. Ce petit test présent à la fin de nombreux formulaires, qui empêchera les robots de spammer vos formulaires.</p> <p>Ils prennent souvent la forme de quelques mots ou suite de chiffres, plus ou moins lisible. Dans les différents exemples ci-dessous même pour un humain, il n'est pas toujours facile de le déchiffrer.</p> <p><span class='spip_document_113 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L264xH191/images-9813f.jpg' width='264' height='191' alt="" style='height:191px;width:264px;' /></span></p> <p><strong>AJAX FANCY CAPTCHA</strong> propose une alternative intéressante. Pour valider le formulaire, vous devrez glisser / déposer l'objet demandé dans l'encart prévu à cet effet. Simple d'installation et d'utilisation, il nécessite ui.core.js, ui.draggable.js et ui.droppable.js.</p> <p><span class='spip_document_112 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH410/captcha-drag-and-drop-9c9d4.png' width='500' height='410' alt="JQuery captcha : Drag and Drop" title="JQuery captcha : Drag and Drop" style='height:410px;width:500px;' /></span></p> <p>Ce n'est certainement pas la solution la plus accessible, la moins lourde à mettre en place ou encore la plus sécurisée, mais elle a le mérite de proposer une alternative. Avec un peu plus d'imagination et de recherche, on doit pouvoir arriver à une solution convenable.</p> <p>Je vous laisse découvrir ça par vous même : <a href="http://www.webdesignbeach.com/beachbar/ajax-fancy-captcha-jquery-plugin" class='spip_out' rel='external'>AJAX FANCY CAPTCHA</a></p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=IghJhGQTJYw:Ko0DBt9wzSE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=IghJhGQTJYw:Ko0DBt9wzSE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=IghJhGQTJYw:Ko0DBt9wzSE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=IghJhGQTJYw:Ko0DBt9wzSE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/IghJhGQTJYw" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Un captcha en JQuery. Glisser / déposer une image pour valider le formulaire&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Trouvailles-Jquery-.html" rel="directory"&gt;Trouvailles Jquery&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-jquery-+.html" rel="tag"&gt;jquery&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-plugin-+.html" rel="tag"&gt;plugin&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-captcha-+.html" rel="tag"&gt;captcha&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/JQuery-captcha-Drag-and-Drop.html</feedburner:origLink></item><item><title>html5media Player audio et vidéo crossBrowser</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/DFVIVpIpk7g/html5media-Player-audio-et-video.html</link><category>html5</category><category>Javacript</category><category>player</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Thu, 18 Aug 2011 02:30:00 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/html5media-Player-audio-et-video.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>html5media est une librairie javascript permettant de lire de l'audio et de la vidéo dans n'importe quel navigateur, grâce aux balises <audio> et <video>, proposées par html5.</p> <p>Intégrer de un player audio ou vidéo n'aura jamais été aussi simple. Cette librairie est compatible avec tous les navigateurs (Je fais confiance aux infos trouvé sur le site, j'ai pas testé tous les navigateurs). Pour les vieux navigateurs, le script appel un player en flash <a href="http://www.flowplayer.org/" class='spip_out' rel='external'>FlowPlayer</a>.</p> <p>Un simple appel au fichier contenant le script, et vous pourrez vous servir librement des balises <audio> et <video>
<code class="html" class='spip_code' dir='ltr'><script src="http://api.html5media.info/1.1.4/html5media.min.js"></script></code></p> <h3 class="spip">html5media, player vidéo</h3>
<p><span class='spip_document_110 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH289/videoPlayer-fbb2a.png' width='500' height='289' alt="" style='height:289px;width:500px;' /></span></p> <p>Rien de plus simple pour intégrer une vidéo : <code class="html" class='spip_code' dir='ltr'><video src="video.mp4" width="320" height="200" controls preload></video></code></p> <p>Dans les options proposés, on retrouve la possibilité d'afficher une image pendant le chargement de la vidéo, histoire que l'internaute est quand même quelque chose à regarder en attendant le chargement.</p> <p>On peut aussi adapter facilement le player pour une utilisation sur mobile, grâce au code ci-dessous :</p> <div style='text-align: left;' class='spip_code' dir='ltr'><code class="html"><video width="618" height="347" controls preload> <br /> <source src="video.mp4" media="only screen and (min-device-width: 960px)"></source><br /> <source src="video.iphone.mp4" media="only screen and (max-device-width: 960px)"></source><br /> </video></code></div>
<h3 class="spip">html5media, player audio</h3>
<p><span class='spip_document_109 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L316xH53/audioPlayer-165fc.png' width='316' height='53' alt="" style='height:53px;width:316px;' /></span></p> <p>L'utilisation du player audio, est aussi simple que celui de la vidéo. Intrégrez le code suivant :</p> <p><code class="html" class='spip_code' dir='ltr'><audio src="audio.mp3" controls preload></audio></code></p> <p>Certains navigateurs ne savent pas lire les mp3, on peut donc leur proposer un format opensource de la manière suivante :</p> <div style='text-align: left;' class='spip_code' dir='ltr'><code class="html"><audio controls preload> <br /> <source src="audio.mp3"></source> <br /> <source src="audio.ogg"></source> <br /> </audio></code></div>
<p>source : <a href="http://html5media.info/" class='spip_url spip_out' rel='nofollow external'>http://html5media.info/</a></p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DFVIVpIpk7g:B_yCJPj3oVQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DFVIVpIpk7g:B_yCJPj3oVQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DFVIVpIpk7g:B_yCJPj3oVQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DFVIVpIpk7g:B_yCJPj3oVQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/DFVIVpIpk7g" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;html5media est une librairie javascript permettant de lire de l'audio et de la vidéo dans n'importe quel navigateur, grâce aux balises &lt;audio&gt; et &lt;video&gt;&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Cote-Blog-.html" rel="directory"&gt;2. Coté Blog&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-html5-+.html" rel="tag"&gt;html5&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-Javacript-+.html" rel="tag"&gt;Javacript&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-player-+.html" rel="tag"&gt;player&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/html5media-Player-audio-et-video.html</feedburner:origLink></item><item><title>Carte de france SVG</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/UdM_rONuaCg/Carte-de-france-SVG.html</link><category>Javacript</category><category>carte</category><category>vectoriel</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Tue, 16 Aug 2011 02:30:00 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/Carte-de-france-SVG.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Restons dans le domaine de la cartographie, avec aujourd'hui une carte des départements de France. Dans le dernier article, je vous présentais une <a href="http://www.creamama.fr/JVectorMap-Plugin-JQuery-carte.html" class='spip_out'>carte du monde en JQuery / svg</a>.</p> <p>Cette fois-ci, pas de JQuery, du pur <strong>Javascript</strong>, cette carte utilise la <a href="http://raphaeljs.com/" class='spip_out' rel='external'>librairie raphaël</a>. Je ne connaissais pas du tout avant de voir cette démo. Pour en faire une brève présentation, elle facilite le travaille sur des données vectorielles. Elle est compatible avec la plupart des navigateurs, même les plus vieux (Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+).
<span class='spip_document_107 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH603/lab-proov-fr_2011-8-9_12-0-52-86638.png' width='500' height='603' alt="" style='height:603px;width:500px;' /></span></p> <p><span class='spip_document_108 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH602/lab-proov-fr_2011-8-9_12-0-52-hover-67e4a.png' width='500' height='602' alt="" style='height:602px;width:500px;' /></span></p> <p>J'ai l'impression que cette démo, reste une démo, et pas un plugin avec tout plein d'options.</p> <p>On trouve le code suivant dans le fichier script.js :</p> <div class="coloration_code"><div class="spip_javascript code"><span style="color: #003366; font-weight: bold;">var</span> current <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span><br /> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> state <span style="color: #000066; font-weight: bold;">in</span> fr<span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> fr<span style="color: #009900;">&#91;</span>state<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">color</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">"#0493AB"</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>st<span style="color: #339933;">,</span> state<span style="color: #009900;">&#41;</span> <span style="color: #009900;">{</span><br /> st<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">cursor</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">"pointer"</span><span style="color: #339933;">;</span><br /> st<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">onmouseover</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;">{</span><br /> current <span style="color: #339933;">&&</span> fr<span style="color: #009900;">&#91;</span>current<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">{</span>fill<span style="color: #339933;">:</span> <span style="color: #3366CC;">"#f5f5f5"</span><span style="color: #339933;">,</span> stroke<span style="color: #339933;">:</span> <span style="color: #3366CC;">"#d5d5d5"</span><span style="color: #009900;">}</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> st.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">{</span>fill<span style="color: #339933;">:</span> st.<span style="color: #660066;">color</span><span style="color: #339933;">,</span> stroke<span style="color: #339933;">:</span> <span style="color: #3366CC;">"#d5d5d5"</span><span style="color: #009900;">}</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//st.toFront();</span><br /> paper.<span style="color: #660066;">safari</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//document.getElementById(state).style.display = "block";</span><br /> <span style="color: #006600; font-style: italic;">//current = state;</span><br /> <span style="color: #009900;">}</span><span style="color: #339933;">;</span><br /> st<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">onmouseout</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;">{</span><br /> st.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">{</span>fill<span style="color: #339933;">:</span> <span style="color: #3366CC;">"#f5f5f5"</span><span style="color: #339933;">,</span> stroke<span style="color: #339933;">:</span> <span style="color: #3366CC;">"#d5d5d5"</span><span style="color: #009900;">}</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #006600; font-style: italic;">//st.toFront();</span><br /> paper.<span style="color: #660066;">safari</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span><span style="color: #339933;">;</span><br /> <br /> <span style="color: #009900;">}</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>fr<span style="color: #009900;">&#91;</span>state<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> state<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /> <span style="color: #009900;">}</span></div><div class='code_download' style='text-align: right;'> <a href='http://www.creamama.fr/local/cache-code/2f1e95b93cd75e192f712e80a82b887b.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'>Télécharger</a></div></div>
<p>Il semble donc relativement facile de modifier le comportement au survol, au clic.</p> <p>Source : <a href="http://lab.proov.fr/carte_france_svg/demo.html" class='spip_out' rel='external'>http://lab.proov.fr/carte_france_svg/demo.html</a></p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=UdM_rONuaCg:vmlSQnQCCTI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=UdM_rONuaCg:vmlSQnQCCTI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=UdM_rONuaCg:vmlSQnQCCTI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=UdM_rONuaCg:vmlSQnQCCTI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/UdM_rONuaCg" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Une carte de France, département par déparement, en svg&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Trouvailles-Jquery-.html" rel="directory"&gt;Trouvailles Jquery&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-Javacript-+.html" rel="tag"&gt;Javacript&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-carte-+.html" rel="tag"&gt;carte&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-vectoriel-+.html" rel="tag"&gt;vectoriel&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/Carte-de-france-SVG.html</feedburner:origLink></item><item><title>JVectorMap : Plugin JQuery carte vectorielle</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/DqjgRVsIjFw/JVectorMap-Plugin-JQuery-carte.html</link><category>jquery</category><category>plugin</category><category>carte</category><category>vectoriel</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Fri, 12 Aug 2011 02:30:00 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/JVectorMap-Plugin-JQuery-carte.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Un <strong>plugin JQuery</strong> pour afficher une <strong>carte du monde au format vectorielle</strong>.</p> <p><span class='spip_document_106 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH338/jvectormap-owl-hollow-net_2011-8-9_11-39-1-8f2f8.png' width='500' height='338' alt="" style='height:338px;width:500px;' /></span></p> <p>Pas mal d'options sont disponibles, pour gérer par exemple, le survol ou le clic d'un pays.</p> <p>Avec des données supplémentaires, il est facile d'enrichir la carte. Dans la démo du site, on voit l'intégratin des données du FMI.</p> <p><span class='spip_document_105 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH316/jvectormap-owl-hollow-net_2011-8-9_11-1-23-2fc99.png' width='500' height='316' alt="" style='height:316px;width:500px;' /></span></p> <p>Le résultat pour une carte du monde est plutôt honnête, mais il peut manquer dans certains cas, des données plus précises concernant par exemple les départements, régions, villes, etc. Heureusement, deux cartes plus précises sont fournies, pour les US, et pour l'Allemagne.</p> <p>Coté technique, on a un script pour les données de la carte, un autre script pour générer la carte, et un fichier de style pour rendre le tout un peu plus agréable. Ce plugin utilise SVG pour les navigateurs "modernes" (Firefox 3 or 4, Safari, Chrome, Opera, IE9). On appréciera quand même le support des versions 6 à 8 d'Internet Explorer grâce à VML</p> <p>source : <a href="http://jvectormap.owl-hollow.net/#data_visualization_with_jvectormap" class='spip_out' rel='external'>http://jvectormap.owl-hollow.net/#data_visualization_with_jvectormap</a></p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DqjgRVsIjFw:Q3r3QKpxpZM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DqjgRVsIjFw:Q3r3QKpxpZM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=DqjgRVsIjFw:Q3r3QKpxpZM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=DqjgRVsIjFw:Q3r3QKpxpZM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/DqjgRVsIjFw" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;Un plugin JQuery qui affiche une carte du monde en vectorielle.&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Trouvailles-Jquery-.html" rel="directory"&gt;Trouvailles Jquery&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-jquery-+.html" rel="tag"&gt;jquery&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-plugin-+.html" rel="tag"&gt;plugin&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-carte-+.html" rel="tag"&gt;carte&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-vectoriel-+.html" rel="tag"&gt;vectoriel&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/JVectorMap-Plugin-JQuery-carte.html</feedburner:origLink></item><item><title>JQuery ChopSlider</title><link>http://feedproxy.google.com/~r/Creamama-Grenoble-web/~3/AcXNjwcwr3E/JQuery-ChopSlider.html</link><category>jquery</category><category>css3</category><category>slider</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Créamama</dc:creator><pubDate>Thu, 11 Aug 2011 00:24:15 PDT</pubDate><guid isPermaLink="false">http://www.creamama.fr/JQuery-ChopSlider.html</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class='rss_texte'><p>Des <strong>sliders JQuery</strong>, il en existe un paquet. Y en des jolis, y en des moches, bref, pour tous les goûts.</p> <p>Et ce matin, je tombe sur ÇA :</p> <p><span class='spip_document_111 spip_documents spip_documents_center'>
<img src='http://www.creamama.fr/local/cache-vignettes/L500xH286/amazing-slider-85014.png' width='500' height='286' alt="" style='height:286px;width:500px;' /></span></p> <p>Franchement, le développeur qui a développé ce slider, c'est sorti les doigts (J'espère juste qu'il s'est lavé les mains :). Il y a une trentaine d'effets de transition différents, certains sont plus gourmand en ressources que d'autres. C'est à la limite ce qu'on pourrait reprocher au plugin, mais on en prend plein la vue.</p> <p>Ce slider utilise les <strong>transitions css3</strong>, on a un joli paquet d'options. Il est par exemple possible de déterminer des transitions particulières pour les navigateurs ne supportant pas css3, ou pour les supports mobiles.</p> <p>source : <a href="http://www.idangero.us/cs/" class='spip_out' rel='external'>http://www.idangero.us/cs/</a></p></div>
		
		<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=AcXNjwcwr3E:KNTbzVEB2Ss:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=AcXNjwcwr3E:KNTbzVEB2Ss:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?i=AcXNjwcwr3E:KNTbzVEB2Ss:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?a=AcXNjwcwr3E:KNTbzVEB2Ss:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Creamama-Grenoble-web?d=TzevzKxY174" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Creamama-Grenoble-web/~4/AcXNjwcwr3E" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;JQuery ChopSlider, un slider avec des effets fous fous fous&lt;/p&gt;

-
&lt;a href="http://www.creamama.fr/-Trouvailles-Jquery-.html" rel="directory"&gt;Trouvailles Jquery&lt;/a&gt;

/ 
&lt;a href="http://www.creamama.fr/+-jquery-+.html" rel="tag"&gt;jquery&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-css3-+.html" rel="tag"&gt;css3&lt;/a&gt;, 
&lt;a href="http://www.creamama.fr/+-slider-+.html" rel="tag"&gt;slider&lt;/a&gt;</description><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">text/html</dc:format><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">fr</dc:language><feedburner:origLink>http://www.creamama.fr/JQuery-ChopSlider.html</feedburner:origLink></item></channel></rss>
