项目作者: Pasquale-CS

项目描述 :
Plugin copy elements for jQuery
高级语言: HTML
项目地址: git://github.com/Pasquale-CS/copy-elements-jquery.git
创建时间: 2017-05-16T09:57:17Z
项目社区:https://github.com/Pasquale-CS/copy-elements-jquery

开源协议:

下载


Demo: https://pasquale-cs.github.io/copy-elements-jquery/


[EN] - Copy elements jQuery

Plugin copy elements for jQuery

Include “js/pcsCpElements.jquery.js” in your project and use the function “$.pcsCpElement()” in your script.

Example include plugin (JS):

  1. <body>
  2. ...
  3. <script src="js/pcsCpElements.jquery.js"></script>
  4. ...
  5. </body>

Example use function:

  1. <body>
  2. ...
  3. <table id="pcs-cp-container">
  4. <tr>
  5. <th>FIELD 1</th>
  6. <th>FIELD 2</th>
  7. <th>FIELD 3</th>
  8. </tr>
  9. <tr id="pcs-cp-element">
  10. <td>First</td>
  11. <td>Second</td>
  12. <td>Third</td>
  13. </tr>
  14. </table>
  15. <button id="pcs-cp-button">Copy</button>
  16. ...
  17. <script>
  18. $(document).ready(function() {
  19. $.pcsCpElement({
  20. container: "#pcs-cp-container", // Set container where copy your element
  21. element: "#pcs-cp-element", // Set copy element
  22. button: "#pcs-cp-button" // Set button for copy element
  23. });
  24. });
  25. </script>
  26. ...
  27. </body>

Do you Like!

Give me a coffee: https://www.paypal.me/pasqualecs
Thank you =)


[IT] - Copiare elementi con jQuery

Plugin per la copia di elementi nella pagina.

Includere il file “js/pcsCpElements.jquery.js” net tuo progetto e usare la funzione “$.pcsCpElement()” nel tuo script.

Esempio per l’inclusione del plugin (JS):

  1. <body>
  2. ...
  3. <script src="js/pcsCpElements.jquery.js"></script>
  4. ...
  5. </body>

Esempio per l’uso:

  1. <body>
  2. ...
  3. <table id="pcs-cp-container">
  4. <tr>
  5. <th>CAMPO 1</th>
  6. <th>CAMPO 2</th>
  7. <th>CAMPO 3</th>
  8. </tr>
  9. <tr id="pcs-cp-element">
  10. <td>Primo</td>
  11. <td>Secondo</td>
  12. <td>Terzo</td>
  13. </tr>
  14. </table>
  15. <button id="pcs-cp-button">Copia</button>
  16. ...
  17. <script>
  18. $(document).ready(function() {
  19. $.pcsCpElement({
  20. container: "#pcs-cp-container", // Set container where copy your element
  21. element: "#pcs-cp-element", // Set copy element
  22. button: "#pcs-cp-button" // Set button for copy element
  23. });
  24. });
  25. </script>
  26. ...
  27. </body>

Ti Piace!

Mi offri un caffè: https://www.paypal.me/pasqualecs
Grazie =)