jQuery(document).ready(function($) { $(document).on('click', '.team-grid-builder .item .header', function() { if($(this).parent().hasClass('active')) { $(this).parent().removeClass('active'); } else { $(this).parent().addClass('active'); } }) $(document).on('click', '.team_member_social_icon', function() { var team_member_social_icon = prompt("Please insert icon url",""); if(team_member_social_icon != null) { var icon_name = $(this).attr("icon-name"); $(this).css("background-image",'url('+team_member_social_icon+')'); $(".team_member_social_icon_"+icon_name).val(team_member_social_icon); } }) $(document).on('click', '.remove_icon', function() { if (confirm('Do you really want to delete this field ?')) { $(this).parent().parent().remove(); } }) $(document).on('click', '.team_content_source', function() { var source = $(this).val(); var source_id = $(this).attr("id"); $(".content-source-box.active").removeClass("active"); $(".content-source-box."+source_id).addClass("active"); }) $(document).on('click', '.new_team_member_social_field', function() { var user_profile_social = prompt("Please add new social site",""); if(user_profile_social != null && user_profile_social != '') { $(".team_member_social_field").append('*X'); } }) });