I am using Acuity Scheduling for a project. It uses prototype.js and allows me to add my own custom code to the head and footer of the page (served to my site via iframe). I'm not familiar with prototype.js, so I'm using jQuery in a way that it won't conflict. My jQuery code and prototype.js were working just fine, until I added this code:
jQuery('body').html(jQuery('body').html().replace('an Appointment','a Session'));
I'm looking for a way to replace specific words in the iframe using jQuery without breaking the other jQuery code or prototype.js.
You can see the content of my iframe here: https://acuityscheduling.com/schedule.php?owner=11134756
If you view the source, you'll see the code I added at the bottom:
<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script language="javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery('body').on('click', '.time-selection', function() {
jQuery('.continueAlert').hide();
jQuery('#rest').append('<p class="continueAlert">Please enter your name and contact info below.</p>');
});
jQuery('body').html(jQuery('body').html().replace('an Appointment','a Session'));
});
</script>
Thanks for any help you can offer!