1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
| <!doctype html>
<html lang="fr">
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta charset="utf-8">
<meta name="Author" content="Daniel Hagnoul">
<base href="http://danielhagnoul.developpez.com/">
<title>Forum jQuery</title>
<link rel="stylesheet" type="text/css" href="styles/dvjhBase.css">
<style>
table { border-collapse:collapse; border:2px solid blue; margin:5px; background-color:#f8f8f8; }
table tr { border:1px solid blue; }
table td { padding:2px; }
.title { border-bottom:none; }
.title span { font-family:monospace; }
.detail { border-top:none; }
</style>
<!--[if lt IE 9]>
<script charset="utf-8" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script charset="utf-8" src="lib/excanvas.js"></script>
<![endif]-->
</head>
<body>
<section id="conteneur">
<header>
<h1>Forum jQuery</h1>
</header>
<aside>
<div id="badgeDVP">
<div class="badgeLogo">
<span class="badgeName">
<a href="http://www.developpez.net/forums/member.php?u=285162" alt="Mon profil" title="Mon profil">Daniel Hagnoul</a>
</span>
<span class="badgePhoto" alt="Avatar de Daniel Hagnoul" title="Avatar de Daniel Hagnoul"></span>
<span class="badgeCorps">
<p style="font-weight:bold;">
Rédacteur / Modérateur
</p>
<p>
<a target="_blank" href="http://danielhagnoul.developpez.com">
<img src="http://www.developpez.net/forums/images/buttons/rss2.png" alt="Mon cahier dexercices sur jQuery" title="Mon cahier dexercices sur jQuery"/>
</a>
<a target="_blank" href="http://www.developpez.net/forums/profile.php?do=addlist&userlist=friend&u=285162">
<img src="http://www.developpez.com/public/images/devenir-ami.png" alt="Devenir mon ami sur Developpez.com" title="Devenir mon ami sur Developpez.com"/>
</a>
<a target="_blank" href="http://www.developpez.net/forums/private.php?do=newpm&u=285162">
<img src="http://www.developpez.com/public/images/message.png" alt="Envoyer un courriel privé sur Developpez.com" title="Envoyer un courriel privé sur Developpez.com"/>
</a>
</p>
<p style="text-align:left;">
<a target="_blank" href="http://www.developpez.net/forums/f1188/webmasters-developpement-web/javascript/bibliotheques-frameworks/jquery/" alt="Retrouvez-moi sur le forum jQuery" title="Retrouvez-moi sur le forum jQuery">
Forum jQuery
</a>
</p>
<p style="text-align:left;">
<a target="_blank" href="http://www.developpez.net/forums/search.php?do=finduser&u=285162" alt="Retrouvez toutes mes interventions sur Developpez.com" title="Retrouvez toutes mes interventions sur Developpez.com">
Mes interventions
</a>
</p>
</span>
<span class="badgeDvp">
<a target="_blank" href="http://www.developpez.com" alt="Club des professionnels de l'informatique" title="Club des professionnels de l'informatique">www.developpez.com</a>
</span>
</div>
</div>
<div id="texte">
<h1>Tutoriels</h1>
<p>
<a href="tutoriels/javascript/outils-pour-construire-code-jquery-evolutif/">Outils pour construire un code jQuery évolutif</a>
</p>
<p>
<a href="tutoriels/javascript/outil-poopj-et-sa-methode-utilisation/">Programmation orientée objet par prototype avec jQuery</a>
</p>
<h1>Site web</h1>
<p>
<a href="index.php">Mon cahier dexercices sur jQuery & Co</a>
</p>
<h1>Règles</h1>
<p>
<a href="http://www.developpez.net/forums/d846412/webmasters-developpement-web/javascript/bibliotheques-frameworks/jquery/devez-lu-derniere-version-message-dutiliser-forum/">Vous devez avoir lu la dernière version (2010-01-06) de ce message avant d'utiliser le forum jQuery</a>
</p>
</div>
</aside>
<article>
<table>
<tbody id="movieList"></tbody>
</table>
<ul id="clients"></ul>
</article>
<article>
<h1>Code jQuery</h1>
<pre>
<script id="movieTemplate" type="text/x-jquery-tmpl">
{{tmpl "#titleTemplate"}}
<tr class="detail"><td>Directeur : ${Director}</td></tr>
</script>
<script id="titleTemplate" type="text/x-jquery-tmpl">
<tr class="title"><td>${Name} <span>(${ReleaseYear})</span></td></tr>
</script>
<script id="clientTemplate" type="text/x-jquery-tmpl">
<li>
<p>
<a href="clients-${id}">${name} - Age: ${age}</a>
</p>
{{tmpl($data) "#phoneTemplate"}}
</li>
</script>
<script id="phoneTemplate" type="text/x-jquery-tmpl">
<ul>
{{each phone}}
<li>${$value}</li>
{{/each}}
</ul>
</script>
<script>
// un array contenant des objets anonymes, écriture JSON
var movies = [
{
Name: "The Red Violin",
ReleaseYear: "1998",
Director: "François Girard"
},
{
Name: "Eyes Wide Shut",
ReleaseYear: "1999",
Director: "Stanley Kubrick"
},
{
Name: "The Inheritance",
ReleaseYear: "1976",
Director: "Mauro Bolognini"
}
];
var clientData = [
{ name: "Rey Bango", age: 42, id: 1, phone: [ "954-600-1234", "954-355-5555" ] },
{ name: "Mark Goldberg", age: 51, id: 2, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Jen Statford", age: 25, id: 3, phone: ["954-600-1234", "954-355-5555"] }
];
$(function(){
$("#movieTemplate").tmpl(movies).appendTo("#movieList");
$("#clientTemplate").tmpl(clientData).appendTo("#clients");
});
</script>
</pre>
</article>
<footer>
<p>Daniel Hagnoul 2010-10-01</p>
</footer>
</section>
<script charset="utf-8" src="lib/jqueryui/js/jquery-1.4.3.min.js"></script>
<script charset="utf-8" src="lib/jquery-jquery-datalink-06f116d/jquery.datalink.js"></script>
<script charset="utf-8" src="lib/jquery-jquery-tmpl-c33c694/jquery.tmpl.js"></script>
<script charset="utf-8" src="lib/jquery-easing-1.3.js"></script>
<script id="movieTemplate" type="text/x-jquery-tmpl">
{{tmpl "#titleTemplate"}}
<tr class="detail"><td>Directeur : ${Director}</td></tr>
</script>
<script id="titleTemplate" type="text/x-jquery-tmpl">
<tr class="title"><td>${Name} <span>(${ReleaseYear})</span></td></tr>
</script>
<script id="clientTemplate" type="text/x-jquery-tmpl">
<li>
<p>
<a href="clients-${id}">${name} - Age: ${age}</a>
</p>
{{tmpl($data) "#phoneTemplate"}}
</li>
</script>
<script id="phoneTemplate" type="text/x-jquery-tmpl">
<ul>
{{each phone}}
<li>${$value}</li>
{{/each}}
</ul>
</script>
<script>
// un array contenant des objets anonymes, écriture JSON
var movies = [
{
Name: "The Red Violin",
ReleaseYear: "1998",
Director: "François Girard"
},
{
Name: "Eyes Wide Shut",
ReleaseYear: "1999",
Director: "Stanley Kubrick"
},
{
Name: "The Inheritance",
ReleaseYear: "1976",
Director: "Mauro Bolognini"
}
];
var clientData = [
{ name: "Rey Bango", age: 42, id: 1, phone: [ "954-600-1234", "954-355-5555" ] },
{ name: "Mark Goldberg", age: 51, id: 2, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Jen Statford", age: 25, id: 3, phone: ["954-600-1234", "954-355-5555"] }
];
$(function(){
$("#movieTemplate").tmpl(movies).appendTo("#movieList");
$("#clientTemplate").tmpl(clientData).appendTo("#clients");
});
</script>
</body>
</html> |
Partager