Afspraak Brightplan

jQuery(document).ready(function ($) { if ($(‘#BrightPlanIframe’).length) { var eventMethod = window.addEventListener ? “addEventListener” : “attachEvent”; var eventer = window[eventMethod]; var messageEvent = eventMethod == “attachEvent” ? “onmessage” : “message”; // Listen to message from child window eventer(messageEvent, function (e) { console.log(‘parent received message!: ‘, e.data); if (e.data.toString().startsWith(“changeHeight_”, 0)) { var height = parseInt(e.data.replace(“changeHeight_”, “”)); $(‘#BrightPlanIframe’).parent().height(height + 100); $(‘#BrightPlanIframe’).height(height + 100); } else if (e.data.toString().startsWith(“scrollTo_”, 0)) { var frameOffset = e.data.replace(“scrollTo_”, “”); $([document.documentElement, document.body]).animate({ scrollTop: $(‘#BrightPlanIframe’).offset().top + parseInt(frameOffset) }, 1000); } else if (e.data.toString().startsWith(“redirecturl_”, 0)) { var redirecturl = e.data.replace(“redirecturl_”, “”); window.location.href = redirecturl; } else { $(‘#BrightPlanIframe’).parent().height(e.data + 100); $(‘#BrightPlanIframe’).height(e.data + 100); } }, false); } });

©  Hestia Cardiovascular Service Center. Alle rechten voorbehouden.