SO fiddle
Test Fiddle mainly for SO Questions
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/overcast/jquery-ui.css">
<div class="editor-label">
<label for="Postcode">Postcode</label>
</div>
<div class="editor-field">
<input id="postcode" name="postcode" type="text" value="" />
<a href="#" class="flyouticon"><img src="/img/help.png" alt="Flyout" width="16" /></a>
<div class="flyoutdialog" title="This is the title">
<p>
You have to fill in a date</p>
</div>
</div>
JavaScript
$(function () {
$('.flyouticon').each(function() {
var dlg = $(this).next(".flyoutdialog");
$(this).click(function() {
dlg.dialog('open');
return false;
});
});
$(".flyoutdialog").dialog({ autoOpen: false });
});