"Add Delete Reset Field of Blocks "
Bootstrap 3.3.0 Snippet by faisalkhan123

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="panel">
<div class="panel-heading">Experience Details</div>
<div class="panel-body">
<div class="team-list">
<div class="team-details">
<div class="individual-fields">
<div class="input-divs hidden-div">
<input type="hidden" name="team_id[]" value="">
</div>
<div class="text-right">Organization Name</div>
<div class="right-float">
<div class="input-divs ui-widget left-float">
<input type="text" name="team_name[]" class="organisation-name form-control">
</div>
<div class="close-div-button close-added-div hidden-div"><a class="delete" style="cirsor:pointer" title="Delete"> <i class="fa fa-trash-o"></i></a></div>
<div class="reset-button hidden-div"><a class="tooltip reset" title="Reset"><i class="fa fa-undo"></i></a></div>
<div class="organization-options"></div>
</div>
<div style="clear:both;"></div>
</div>
<div class="individual-fields">
<div class="text-right">Designation</div>
<div class="right-float">
<div class="input-divs uli-widget">
<input type="text" name="Designation[]" class="designation-tags">
</div>
<div class="designation-options"></div>
</div>
<div style="clear:both;"></div>
</div>
<div class="individual-fields">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$(function(){
// when use click on close button
$('.team-list').on("click",".close-div-button",function(){
if($(this).parents('.team-details').find('input[name^=team_id]').val()!='')
{
var id=$(this).parents('.team-details').find('input[name^=team_id]').val();
var r=confirm('Are you sure you want to delete this location?');
if(r==true)
{
$(this).parents('.team-details').remove();
$.ajax({
url: "/index.php/creative/delete_team",
type:"post",
data:{"id":id},
success:function(data){
console.log(data);
}
});
$('.team-list').find('.team-details').last().css("border-bottom","0px");
}
else if(r==false){
return;
}
}
else{
$(this).parents('.team-details').remove();
$('.team-list').find('.team-details').last().css("border-bottom","0px");
}
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: