ce code est Mootools:a une méthode comme substitut de Mootools dans jquery
var myString = "{subject} is {property_1} and {property_2}.";
var myObject = {subject: 'Jack Bauer', property_1: 'our lord', property_2: 'savior'};
myString.substitute(myObject);
et ne jquery a cette mothod? ou comme cette méthode?
http://www.planabc.net/2011/05/31/simple_javascript_template_substitute/ https://github.com/yui/yui3/blob/master/src/substitute/js/substitute.js Voici La solution de YUI. –