$(document).ready(function() { $("li.dropdown span.username:contains('Contact for')").each(function(){ $(this).text(""); }); var div = $(".well:contains('Contact for')"); if (div.length == 1) { var fullname = $(div).text().trim(); var replaced = $(div).html().replaceAll(fullname, ""); $(div).html(replaced); } /* HOME PAGE */ /* Get iframe src attribute value and store it in a variable */ var url = $("#youTubeWindow").attr('src'); /* Assign empty url value to the iframe src attribute when modal hides, which stops playing the video */ $("#youTubeModal").on('hide.bs.modal', function(){ $("#youTubeWindow").attr('src', ''); }); /* Assign the initially stored url back to the iframe src attribute when the modal is displayed again */ $("#youTubeModal").on('show.bs.modal', function(){ $("#youTubeWindow").attr('src', url); }); // To Enable Sharing functionality $('body').append(' '); });