Skip to content

Instantly share code, notes, and snippets.

View elib0's full-sized avatar
🏠
Working from home

Eli j. Chavez elib0

🏠
Working from home
View GitHub Profile
@elib0
elib0 / template_repeater.js
Created May 4, 2016 19:38
Elementos dinámicos con jquery(Boton de agregar y eliminar los elementos)
$.on('click','.dinamic .add',function(e){
/* Elementos dinamicos. Solo es necesario agregar las clases dinamic, add y remove,
como se muestra en el ejemplo a continuacion:
<div class="dinamic">(contenedor)
<div>(elemento inicial)
<input/>
<button type="button" class="add">agregar</button>
</div>
<script class="template" type="text/x-jquery-tmpl">(plantilla de nuevo elemento)
<div>