OPIS Calculator Widget
Integrate the OPIS Calculator into your website with our embeddable widget. The widget provides a complete IVF success rate calculator that can be easily embedded into any website.
Live Widget Demo
Loading OPIS Calculator...
How to Embed This Widget
Step 1: Include the Embed Script
Add this script tag to your page (preferably in the <head> section):
<script src="/js/widget-embed.js" defer></script>Using defer ensures the script loads without blocking page rendering.
Step 2: Add Container Element
Add an empty container where you want the widget to appear:
<div id="my-opis-widget-container"></div>Step 3: Initialize the Widget
Initialize the widget with JavaScript:
<script>
document.addEventListener('DOMContentLoaded', function() {
if (typeof initOPISWidget === 'function') {
initOPISWidget('my-opis-widget-container', 'YOUR_WIDGET_ID');
} else {
console.error("initOPISWidget is not available. Check if widget-embed.js loaded correctly.");
}
});
</script>Important: Replace 'YOUR_WIDGET_ID' with your unique widget identifier. The container ID can be customized to any unique value on your page. The widget will automatically resize to fit its content.
Widget Features:
- Three different IVF calculators (Pre IVF, Post IVF, OPIS-2)
- Responsive design that works on all devices
- Automatic height adjustment
- University of Aberdeen branding
- Professional medical-grade calculations
