Widgets > wijtooltip > wijtooltip How To > Create a Modal Tooltip |
To create a modal tooltip, set the modal option to true, like the following:
<script id="scriptInit" type="text/javascript">
$(document).ready(function () {
$("#target>a").wijtooltip({
modal: true,
closeBehavior: "sticky"
});
$("#isModal").click(function () {
$("#target>a").wijtooltip("option", "modal", !!$("#isModal").is(":checked"));
});
});
</script>
<div class="main demo">
<!-- Begin demo markup -->
<div id="tooltip">
</div>
<h3 id="target" class="ui-helper-reset ui-widget-header ui-corner-all" style="padding: 1em;">
<a href="#" title="Hover on me to close">Hover on the element</a>
</h3>
<!-- End demo markup -->
<div class="demo-options">
<!-- Begin options markup -->
<label for="isModal">
Modal</label>
<input type="checkbox" id="isModal" checked="checked" />
<!-- End options markup -->
</div>
</div>