\
\
\
\
General
\
Email Address: '+mail+'
\
\
';
$('#v-pills-tab').append(tablist);
$('#v-pills-tabContent').append(tabcontent);
$('.contacts-tabs .nav-link ').removeClass('active show');
$('.contacts-tabs .tab-content .tab-content-child ').removeClass('active show');
$( '.contact-tab-'+index_var ).addClass('active show');
$('#exampleModal').modal('toggle');
$('#bookmark-form').find('input[type="text"]').val('');
var notify = $.notify('Contact added successfully.', {
type: 'contactadd',
allow_dismiss: false,
delay: 2000,
placement: {
from: 'top',
align: 'center'
},
timer: 300
});
}
}
(function($) {
$(".contact-editform").hide();
$(".more-data").hide();
})(jQuery);
// edit contact
function editContact(index){
$("#v-pills-tabContent").hide();
$(".contact-editform").show();
var first_name = $(".first_name_"+index).html();
var last_name = $(".last_name_"+index).html();
var email_add = $(".email_add_"+index).html();
$("#first_name").val(first_name);
$("#last_name").val(last_name);
$("#email_add").val(email_add);
}
// print contact
function printContact(index){
var print_name = $(".first_name_"+index).html();
var plast_name = $(".last_name_"+index).html();
var pemail_add = $(".email_add_"+index).html();
var update_img = $(".update_img_"+index).attr("src");
$("#printname").html(print_name);
$("#printlast").html(plast_name);
$("#printmail").html(pemail_add);
$("#mailadd").html(pemail_add);
$("#updateimg").attr("src",update_img);
}
// delete
function deleteContact(index){
swal({
title: "Are you sure?",
text: "This contact will be deleted from your Personal Contacts and from the chat list too.",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
$('.contact-tab-'+index).hide();
$( '.contact-tab-'+index ).next().addClass('active show');
} else {
swal("Your contact is safe!");
}
})
// var el = $('contact-tab-'+index);
// el.addClass('delete-contact');
}
function activeDiv(index){
$('.contacts-tabs .nav-link ').removeClass('active show');
$('.contacts-tabs .tab-content .tab-content-child ').removeClass('active show');
$( '.contact-tab-'+index ).addClass('active show');
}
// upload images
function readURL(input,index){
// console.log(input.files[0]);
var elems = document.getElementsByClassName('update_img_'+index);
for(i=0;i
'+divToPrint.innerHTML+'