File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -931,14 +931,15 @@ and insert it in the form. Here is a sample that you will have to adapt.
931931.. code-block :: javascript 
932932 < script type= " text/javascript" >  
933933 jQuery (' #add-element' click (function () { 
934-  var  prototype =  $ (' form#my_form #my_collection' attr (' data-prototype'  
934+  var  prototype =  jQuery (' form#my_form #my_collection' attr (' data-prototype'  
935935
936936 //  the level of the prototype is replaced by $$name$$ 
937-  //  you have to change this to the number of items + 1 
937+  //  you might have have to change this to be coherent 
938+  //  with your row ordering. 
938939 prototype =  prototype .replace (/ \$\$ name\$\$ / g' 00'  
939940
940941 //  Append the prototype to the DOM 
941-  $ (' #my_prototype' append (prototype); 
942+  jQuery (' #my_prototype' append (prototype); 
942943 }); 
943944 < / script>  
944945
                         You can’t perform that action at this time. 
           
                  
0 commit comments