User:Technical 13/SandBox/Flyout test.js

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var FlyOutTest = mw.util.addPortletLink('p-personal', '//en.wikipedia.org/wiki/Main_page', '0', 'flyouttest', 'This is a flyout test', '', '#pt-userpage');
$( FlyOutTest ).click( function ( e ) {
e.preventDefault();
$('#flyouttest').html('<span style="min-width: 7px; border-radius: 2px; padding: 0.25em 0.45em 0.2em; margin-left: -4px; text-align: center; background-color: rgb(210, 210, 210); font-weight: bold; color: white; cursor: pointer; text-decoration: none;">0</span><div class="mw-echo-overlay-pokey"></div><div style="display: block; position: absolute; top: 30px; left: -200px; border: 1px solid silver; background-color: rgb(255, 255, 255); width: 450px; min-height: 2em; padding: 0px; color: rgb(109, 109, 109); z-index: 100; box-shadow: 0px 3px 8px rgba(50, 50, 50, 0.35);"><div style="font-size: 13px; line-height: 15px; padding: 15px 15px 15px 28px; border-bottom: 1px solid rgb(221, 221, 221);"><div id="mw-echo-overlay-title-text"><b>Header</b></div></div><table width="100%"><thead><tr><th>Left side header</th><th>Right side header</th></tr></thead><tbody><tr><td><table><tr><td>Left side body</td></tr></table></td><td><table><tr><td>Right side body</td></tr></table></td></tr></tbody></table><div style="font-size: 13px; line-height: 15px; padding: 15px 15px 15px 28px; border-bottom: 1px solid rgb(221, 221, 221);"><a href="#" class="mw-echo-grey-link" id="mw-acc-overlay-pref-link">Preferences link</a></div></div>');
});
$('#flyouttest').html('<span style="min-width: 7px; border-radius: 2px; padding: 0.25em 0.45em 0.2em; margin-left: -4px; text-align: center; background-color: rgb(210, 210, 210); font-weight: bold; color: white; cursor: pointer; text-decoration: none;">0</span>');