$(function() { // GLOBAL var phoneNumber = $("#phone-placeholder").text(); var emailAddress = $("#email-placeholder").text(); var brochure = $("#brochure-placeholder").text(); var operationalGuide = $("#operational-guide-placeholder").text(); var phonicsHandbook = $("#phonics-handbook-placeholder").text(); $('.insert_phone_number').each(function() { $(this).text(phoneNumber); $(this).attr("href", "tel:"+phoneNumber); }); $('.insert_email').each(function() { $(this).text(emailAddress); $(this).attr("href", "mailto:"+emailAddress); }); $('.insert_brochure_link').each(function() { $(this).attr("href", brochure); $(this).attr("target", "_blank"); }); $('.insert_guide_link').each(function() { $(this).attr("href", operationalGuide); $(this).attr("target", "_blank"); }); $('.insert_handbook_link').each(function() { $(this).attr("href", phonicsHandbook); $(this).attr("target", "_blank"); }); // CONTACT INFO SOCIAL if ($(".contact-info-social").length > 0) { $(".contact-info-social").html($("#social-links-placeholder").html()); } // AT SCHOOL if ($("#select_reps").length > 0) { $("#select_reps div").html($("#reps-placeholder").html()); } });