{"id":211590,"date":"2014-02-06T08:19:03","date_gmt":"2014-02-06T04:19:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=211590"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=211590","title":{"rendered":"<span class=\"post_title\">Repeatable, \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t(\u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u00ab\u043c\u0430\u043b\u0430\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u00bb)<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Repeatable?<\/h4>\n<p>  Repeatable \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0432\u043e\u0434\u0430 (\u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438) \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043f\u0440. \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <br \/>  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442, \u0441\u043a\u0430\u0436\u0435\u043c, {{mustache}} templates). <\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0418 \u0432\u0441\u0451 \u044d\u0442\u043e <a href=\"https:\/\/code.google.com\/p\/widgets-js\/source\/browse\/trunk\/repeatable\/repeatable.js\">\u0432 90 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043a\u043e\u0434\u0430<\/a>. <\/p>\n<p>  Repeatable \u0444\u0443\u043d\u043a\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0435\u0441\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u00ab\u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c\u00bb web framework&#8217;\u0435. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e \u0442\u0435\u043c \u0438\u043b\u0438 \u0438\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0437\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u043d\u0441\u0442\u0440\u0430\u043c\u0438 \u0442\u043e \u0432\u043e\u0442 \u0432\u0430\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0447\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0438\u0442.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440<\/h4>\n<p>  \u0421\u043a\u0430\u0436\u0435\u043c \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:   <\/p>\n<pre><code class=\"javascript\">var data = [        { name: &quot;Olga&quot;, age: 20, email: &quot;aaa@example.com&quot; },        { name: &quot;Peter&quot;, age: 30, email: &quot;bbb@example.com&quot; },        { name: &quot;Ivan&quot;, age: 15, email: &quot;ccc@example.com&quot; },     ]; <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"html\">&lt;ul id=&quot;people&quot;&gt;     &lt;li&gt;&lt;a href=&quot;mailto:{{this.email}}&quot;&gt;{{this.name}}&lt;\/a&gt; &lt;b if=&quot;this.age &gt; 18&quot;&gt;18+&lt;\/b&gt; &lt;\/li&gt;      &lt;li&gt;No data available&lt;\/li&gt; &lt;\/ul&gt; <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 <code>&lt;li&gt;<\/code> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0435\u0441\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0437\u0430\u043f\u0438\u0441\u0438. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438 <s>\u0438 \u0433\u0443\u043b\u044f\u0448\u0448\u044b\u043c\u0438 \u0434\u0435\u0432\u0430\u043c\u0438<\/s>. \u0412\u0442\u043e\u0440\u043e\u0439 <code>&lt;li&gt;<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0435\u0441\u043b\u0438 Repetable \u00ab\u043d\u0430\u043a\u043e\u0440\u043c\u0438\u0442\u044c\u00bb \u043f\u0443\u0441\u0442\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u043e \u0441\u043e\u0431\u0441\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<pre><code class=\"javascript\">var list = $(&quot;ul#people&quot;).repeatable(); \/\/ declaring the repeatable     list.value = data; \/\/ that's data population, sic! <\/code><\/pre>\n<p>  \u0412\u043e\u0442 <a href=\"http:\/\/terrainformatica.com\/widgets.js\/repeatable\/repeatable-test.htm\">\u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a>. <\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041c\u0438\u043a\u0440\u043e\u0444\u043e\u0440\u043c\u0430\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/h4>\n<p>  \u0422\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u00abmustache\u00bb \u0441\u043a\u043e\u0431\u043a\u0430\u0445: <code>{{ ...expr ...}}<\/code>.<br \/>  \u041f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0438 \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u044b \u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<h5>\u0421\u043f\u0435\u0446\u0438\u043f\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445<\/h5>\n<ul>\n<li><code>this<\/code> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430.<\/li>\n<li><code>$index<\/code> \u2014 \u0447\u0438\u0441\u043b\u043e, \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0438\u0441\u043a\u0430;<\/li>\n<li><code>$first<\/code> \u2014 <code>true<\/code> \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442;<\/li>\n<li><code>$last<\/code> \u2014 <code>true<\/code> \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442;<\/li>\n<li><code>$length<\/code> \u2014 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435.<\/li>\n<\/ul>\n<h5>\u0423\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u041b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 repeatable \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043a\u0430\u043a \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0443 \u043d\u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>if=&quot;...expr...&quot;<\/code>. \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u00abtruthy\u00bb \u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0443\u0434\u0430\u043b\u0435\u043d.<\/p>\n<p>  \u0414\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 repeatable plugin \u2014 <a href=\"https:\/\/code.google.com\/p\/widgets-js\/wiki\/Repeatable\">\u0437\u0434\u0435\u0441\u044c<\/a><br \/>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a repeatable \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435:<\/p>\n<pre><code class=\"javascript\">\/** * @author Andrew Fedoniouk &lt;andrew@terrainformatica.com&gt; * @name jQuery repeatable() * @license WTFPL (http:\/\/sam.zoy.org\/wtfpl\/) * @purpose template-less population of repeatables (lists) *\/  (function ($) {    function repeatable(el) {              var $el = $(el);     var template = $el.find(&quot;&gt;*&quot;).remove();     var nrTemplate = template.length &gt; 1 ? $(template[1]) : null; \/\/ &quot;no records&quot; template         template = $(template[0]);          var compiled = {}; \/\/ compiled expressions     var vector = null; \/\/ data     var index = 0;     \/\/ current index being processed      \/\/function evalExpr(str) { return eval(&quot;(&quot; + str + &quot;)&quot;); }     function compiledExpr(str) {        var expr = compiled[str];        if( !expr )         compiled[str] = expr = new Function(&quot;$index&quot;,&quot;$first&quot;,&quot;$last&quot;,&quot;$total&quot;, &quot;return (&quot; + str + &quot;)&quot;);        return expr;     }      function replace(text, data) {       function subst(a, b) {          var expr = compiledExpr(b);         var s = expr.call(data, index, index==0,index==vector.length - 1, vector.length); return s === undefined ? &quot;&quot; : s;        }       return text.replace(\/{{(.*)}}\/g, subst);     }      function instantiate(el, data) {       var attributes = el.attributes;       for (var i = 0; i &lt; attributes.length; ++i) {         var attribute = attributes[i];         if (attribute.name == &quot;if&quot;) {           var str = attribute.value;           var expr = compiledExpr(str);           var tokeep = expr.call(data, index, index == 0, index == vector.length - 1, vector.length);           if (!tokeep) { el.parentElement.removeChild(el); return; }         }         else if (attribute.value.indexOf(&quot;{{&quot;) &gt;= 0)           attribute.value = replace(attribute.value, data);       }       for (var nn, n = el.firstChild; n; n = nn) {         var nn = n.nextSibling;         if (n.nodeType == 1)  \/\/ element           instantiate(n, data);         else if (n.nodeType == 3) \/\/ text         {           var t = n.textContent;           if (t.indexOf(&quot;{{&quot;) &gt;= 0)             n.textContent = replace(t, data);         }       }     }      function getValue() { return vector; }      function setValue(newValue) {       vector = newValue;       var t = template[0];       if( !vector || vector.length == 0 ) {         $el.empty();         if(nrTemplate)           $el.append(nrTemplate); \/\/ no records       }       else {         var fragment = document.createDocumentFragment();         for (index = 0; index &lt; vector.length; ++index) {           var nel = t.cloneNode(true);           instantiate(nel, vector[index]);           fragment.appendChild(nel);         }         $el.empty();         $el.append(fragment);       }     }      el.getValue = getValue; el.setValue = setValue;         \/\/ redefine its 'value' property, setting value to some array will cause popupaltion of the repeatable by that data.     try { Object.defineProperty(el, &quot;value&quot;, { get: getValue, set: setValue, enumerable: true, configurable: true }); } catch(e) {}      return el;   }    $.fn.repeatable = function () {     var el = null;     this.each(function () { el = repeatable(this); });     return el; \/\/ returns last matched element!   };  })(jQuery);  <\/code><\/pre>\n<p>  \u0423\u0441\u043f\u0435\u0445\u043e\u0432.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/211590\/\"> http:\/\/habrahabr.ru\/post\/211590\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t(\u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u00ab\u043c\u0430\u043b\u0430\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u00bb)<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Repeatable?<\/h4>\n<p>  Repeatable \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0432\u043e\u0434\u0430 (\u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438) \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043f\u0440. \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <br \/>  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442, \u0441\u043a\u0430\u0436\u0435\u043c, {{mustache}} templates). <\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0418 \u0432\u0441\u0451 \u044d\u0442\u043e <a href=\"https:\/\/code.google.com\/p\/widgets-js\/source\/browse\/trunk\/repeatable\/repeatable.js\">\u0432 90 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043a\u043e\u0434\u0430<\/a>. <\/p>\n<p>  Repeatable \u0444\u0443\u043d\u043a\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0435\u0441\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u00ab\u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c\u00bb web framework&#8217;\u0435. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e \u0442\u0435\u043c \u0438\u043b\u0438 \u0438\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0437\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u043d\u0441\u0442\u0440\u0430\u043c\u0438 \u0442\u043e \u0432\u043e\u0442 \u0432\u0430\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0447\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0438\u0442.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440<\/h4>\n<p>  \u0421\u043a\u0430\u0436\u0435\u043c \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:   <\/p>\n<pre><code class=\"javascript\">var data = [        { name: &quot;Olga&quot;, age: 20, email: &quot;aaa@example.com&quot; },        { name: &quot;Peter&quot;, age: 30, email: &quot;bbb@example.com&quot; },        { name: &quot;Ivan&quot;, age: 15, email: &quot;ccc@example.com&quot; },     ]; <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"html\">&lt;ul id=&quot;people&quot;&gt;     &lt;li&gt;&lt;a href=&quot;mailto:{{this.email}}&quot;&gt;{{this.name}}&lt;\/a&gt; &lt;b if=&quot;this.age &gt; 18&quot;&gt;18+&lt;\/b&gt; &lt;\/li&gt;      &lt;li&gt;No data available&lt;\/li&gt; &lt;\/ul&gt; <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 <code>&lt;li&gt;<\/code> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0435\u0441\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0437\u0430\u043f\u0438\u0441\u0438. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438 <s>\u0438 \u0433\u0443\u043b\u044f\u0448\u0448\u044b\u043c\u0438 \u0434\u0435\u0432\u0430\u043c\u0438<\/s>. \u0412\u0442\u043e\u0440\u043e\u0439 <code>&lt;li&gt;<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0435\u0441\u043b\u0438 Repetable \u00ab\u043d\u0430\u043a\u043e\u0440\u043c\u0438\u0442\u044c\u00bb \u043f\u0443\u0441\u0442\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u043e \u0441\u043e\u0431\u0441\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<pre><code class=\"javascript\">var list = $(&quot;ul#people&quot;).repeatable(); \/\/ declaring the repeatable     list.value = data; \/\/ that's data population, sic! <\/code><\/pre>\n<p>  \u0412\u043e\u0442 <a href=\"http:\/\/terrainformatica.com\/widgets.js\/repeatable\/repeatable-test.htm\">\u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a>. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-211590","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211590"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211590\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}