<?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>JQuery, PHP, html, design... // arnaud-k : un blog de geek &#187; cycle</title>
	<atom:link href="http://blog.arnaud-k.fr/tag/cycle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.arnaud-k.fr</link>
	<description>Le blog JQuery, Html, Web Design</description>
	<lastBuildDate>Thu, 21 Apr 2011 08:10:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tutorial plugin JQuery #4 : diaporama photo avec Cycle</title>
		<link>http://blog.arnaud-k.fr/2009/04/24/tutorial-plugin-jquery-4-diaporama-photo-avec-cycle/</link>
		<comments>http://blog.arnaud-k.fr/2009/04/24/tutorial-plugin-jquery-4-diaporama-photo-avec-cycle/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 11:49:05 +0000</pubDate>
		<dc:creator>arnaud</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[diaporama]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[plugin JQuery]]></category>

		<guid isPermaLink="false">http://blog.arnaud-k.fr/?p=335</guid>
		<description><![CDATA[Plugin JQuery que je connaissais depuis quelques temps déjà : Cycle. Cycle est plugin permettant de faire très simplement un diaporama de photos (ou d&#8217;images) avec JQuery.  27 effets de transitions sont disponibles avec le plugin de base et encore&#160;[...]</p> <p class="read-more"><a class="gray normal" href="http://blog.arnaud-k.fr/2009/04/24/tutorial-plugin-jquery-4-diaporama-photo-avec-cycle/">Lire la suite&#160;&#62;&#62;</a></p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.arnaud-k.fr%2F2009%2F04%2F24%2Ftutorial-plugin-jquery-4-diaporama-photo-avec-cycle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.arnaud-k.fr%2F2009%2F04%2F24%2Ftutorial-plugin-jquery-4-diaporama-photo-avec-cycle%2F&amp;source=arnaudk&amp;style=compact&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Plugin JQuery que je connaissais depuis quelques temps déjà : <a href="http://malsup.com/jquery/cycle/">Cycle</a>. <strong>Cycle est plugin permettant de faire très simplement un diaporama de photos</strong> (ou d&#8217;images) avec JQuery.  27 effets de transitions sont disponibles avec le plugin de base et encore plus en le couplant avec le plugin <a href="http://gsgd.co.uk/sandbox/jquery.easing.php">JQuery.Easing</a>.</p>
<p><img class="aligncenter size-full wp-image-336" title="Diaporama photo avec Jquery et le plugin Cycle" src="http://blog.arnaud-k.fr/wp-content/uploads/2009/04/cycle.png" alt="Diaporama photo avec Jquery et le plugin Cycle" width="600" height="200" /></p>
<p><a href="http://blog.arnaud-k.fr/cycle/index.php">Voir une démo en live du plugin Cycle</a> (tous les effets sont testables directement à partir de la liste déroulante).</p>
<p><a class="demo" href="http://blog.arnaud-k.fr/cycle/index.php" title="demo du plugin JQuery Cycle">demo du plugin JQuery Cycle</a></p>
<h3><span style="color: #ffa800;">Voici donc comment mettre en place le plugin le plus simplement : </span></h3>
<p>On commence par charger le framework JQuery et le plugin Cycle (il faut que ce soit dans cet ordre) :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.cycle.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>Ensuite il faut, dans le code html, insérer toutes les images que l&#8217;on veut dans le diaporama. Il faut que ces images soit les une à la suite des autres dans un bloc (&lt;div&gt; de préférence) ayant un id (ici l&#8217;id est diapo)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;diapo&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;5.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;6.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;7.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;8.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;9.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Enfin il faut initialiser le plugin dans le code JavaScript de la page (soit un fichier externe soit directement dans la page) en indiquant dans le selecteur l&#8217;id du bloc contenant les photos. J&#8217;ai ajouté deux attributs : <strong>fx qui permet de choisir l&#8217;effet de transition</strong> (voir la page de démo pour la liste des effets disponibles) et <strong>timeout qui permet de définir la vitesse</strong> de défilement des photos.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<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><span style="color: #3366CC;">'#diapo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cycle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> <span style="color: #009966; font-style: italic;">/* #diapo signifie &quot;le bloc ayant diapo comme id&quot; */</span>
    		fx<span style="color: #339933;">:</span>    <span style="color: #3366CC;">'toss'</span><span style="color: #339933;">,</span> <span style="color: #009966; font-style: italic;">/* effet choisi (voir la liste deroulante ci-dessous) */</span>
    		timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">3000</span> <span style="color: #009966; font-style: italic;">/* temps en millisecondes (ici 2 secondes) entre chaque photo */</span>
    	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Le plugin JQuery.Cycle est disponible en <a href="http://malsup.com/jquery/cycle/download.html">téléchargement ici</a>.</p>


<p>Pas encore de billet sur le même sujet !</p>]]></content:encoded>
			<wfw:commentRss>http://blog.arnaud-k.fr/2009/04/24/tutorial-plugin-jquery-4-diaporama-photo-avec-cycle/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>En vrac : plugins JQuery</title>
		<link>http://blog.arnaud-k.fr/2009/04/09/en-vrac-plugins-jquery/</link>
		<comments>http://blog.arnaud-k.fr/2009/04/09/en-vrac-plugins-jquery/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:50:42 +0000</pubDate>
		<dc:creator>arnaud</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[carte]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[imageSwitch]]></category>
		<category><![CDATA[plugin JQuery]]></category>

		<guid isPermaLink="false">http://blog.arnaud-k.fr/?p=130</guid>
		<description><![CDATA[Pour cette petite sélection de la semaine, je te propose une flopée de plugins JQuery.  Je reviendrai peut-être plus précisément sur un ou plusieurs dans le cadre des tutoriels sur les plugins JQuery. - Un des plus connus (que j&#8217;ai&#160;[...]</p> <p class="read-more"><a class="gray normal" href="http://blog.arnaud-k.fr/2009/04/09/en-vrac-plugins-jquery/">Lire la suite&#160;&#62;&#62;</a></p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.arnaud-k.fr%2F2009%2F04%2F09%2Fen-vrac-plugins-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.arnaud-k.fr%2F2009%2F04%2F09%2Fen-vrac-plugins-jquery%2F&amp;source=arnaudk&amp;style=compact&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Pour cette petite sélection de la semaine, je te propose une flopée de plugins JQuery.  Je reviendrai peut-être plus précisément sur un ou plusieurs dans le cadre des <a href="http://blog.arnaud-k.fr/tag/plugin-jquery/">tutoriels sur les plugins JQuery</a>.</p>
<p><img class="aligncenter size-full wp-image-131" title="Sélection de plugins JQuery." src="http://blog.arnaud-k.fr/wp-content/uploads/2009/04/jquery.png" alt="Sélection de plugins JQuery." width="600" height="200" /></p>
<p>- Un des plus connus (que j&#8217;ai vu sur pas mal de site) : <a href="http://www.malsup.com/jquery/cycle/">Cycle</a>. Ce plugin permet de faire un diaporama de photos. Couplé avec le plugin <a href="http://gsgd.co.uk/sandbox/jquery/easing/">easing</a> (qui permet divers effets de mouvement) plusieurs effets de transition sont proposés (fondu enchainé, rotation de l&#8217;image, défilement vers la droite). Il est également possible d&#8217;automatiser le défilement ou de permettre le contrôle au clic.</p>
<p style="text-align: left; margin-top:25px;">- <a href="http://www.hieu.co.uk/blog/index.php/imageswitch/">ImageSwitch</a> propose à peu près les mêmes fonctionnalités que Cycle. Mais avec, en plus, la possibilité de contrôler à distance l&#8217;effet. De plus il propose des effets de transitions différents de Cycle. Sur le blog du créateur du plugin, on peut également trouver un post qui donne <a href="http://www.hieu.co.uk/blog/index.php/2009/03/21/8-guides-to-apply-jquery-and-imageswitch-in-web-design/">8 exemples d&#8217;utilisation du plugin ImageSwitch</a>. Je pense que je reviendrai bientôt sur l&#8217;utilisation de ce plugin (avec probablement une utilisation sur mon blog).<img class="aligncenter size-medium wp-image-132" style="border:1px solid #bbb;" title="Plugin Jquery ImageSwitch" src="http://blog.arnaud-k.fr/wp-content/uploads/2009/04/imageswitch-300x100.png" alt="Plugin Jquery ImageSwitch" width="300" height="100" /></p>
<p style="text-align: left;">
<p style="text-align: left; margin-top:35px;">- Pas vraiment un plugin, mais un exemple d&#8217;utilisation (avec des explications) de JQuery pour la création d&#8217;une carte intéractive. Ca montre qu&#8217;on peut se passer de flash pour faire des belles choses qui bougent ! Les explications se trouvent sur le site <a href="http://www.newmediacampaigns.com/page/jquery-vs-flash-for-interactive-map">Newmediacampaigns.com</a> et l&#8217;exemple <a href="http://ncmarinescience.com/">par ici</a>.</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-133" style="border:1px solid #bbb;" title="Carte intéractive avec JQuery" src="http://blog.arnaud-k.fr/wp-content/uploads/2009/04/jmap-300x100.png" alt="Carte intéractive avec JQuery" width="300" height="100" /></p>
<p style="text-align: left; margin-top:35px;">- Le plugin <a href="http://widowmaker.kiev.ua/checkbox/">JQuery Checkbox</a>, permet de personnaliser l&#8217;affichage des case à cocher (checkbox) et des bouton radio des formulaires. Très simple d&#8217;utilisation. Pas grand chose de plus à dire à part te montrer un aperçu&#8230;</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-134" style="border:1px solid #bbb;" title="JQuery Checkbox" src="http://blog.arnaud-k.fr/wp-content/uploads/2009/04/checkbox.png" alt="JQuery Checkbox" width="300" height="100" /></p>


<p>Pas encore de billet sur le même sujet !</p>]]></content:encoded>
			<wfw:commentRss>http://blog.arnaud-k.fr/2009/04/09/en-vrac-plugins-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

