lavkach3
1$(function () {2"use strict";3
4// Default5$(".repeater-default").repeater();6
7// Custom Show / Hide Configurations8$(".file-repeater, .email-repeater").repeater({9show: function () {10$(this).slideDown();11},12hide: function (remove) {13if (confirm("Are you sure you want to remove this item?")) {14$(this).slideUp(remove);15}16},17});18});19
20var room = 1;21
22function education_fields() {23room++;24var objTo = document.getElementById("education_fields");25var divtest = document.createElement("div");26divtest.setAttribute("class", "mb-3 removeclass" + room);27var rdiv = "removeclass" + room;28divtest.innerHTML =29'<form class="row"><div class="col-sm-3"><div class="form-group"><input type="text" class="form-control" id="Schoolname" name="Schoolname" placeholder="School Name"></div></div><div class="col-sm-2"> <div class="form-group"> <input type="text" class="form-control" id="Age" name="Age" placeholder="Age"> </div></div><div class="col-sm-2"> <div class="form-group"> <input type="text" class="form-control" id="Degree" name="Degree" placeholder="Degree"> </div></div><div class="col-sm-3"> <div class="form-group"> <select class="form-select" id="educationDate" name="educationDate"> <option>Date</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> </select> </div></div><div class="col-sm-2"> <div class="form-group"> <button class="btn btn-danger" type="button" onclick="remove_education_fields(' +30room +31');"> <i class="ti ti-minus"></i> </button> </div></div></form>';32
33objTo.appendChild(divtest);34}
35
36function remove_education_fields(rid) {37$(".removeclass" + rid).remove();38}
39