User:Mono: Difference between revisions
Content deleted Content added
No edit summary |
try |
||
Line 1: | Line 1: | ||
<html |
<html> |
||
<div id="dialog" title="Basic dialog"> |
|||
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> |
|||
</div> |
|||
<a href="#">Test</a> |
|||
<script> |
|||
mw.loader.using(['jquery.ui.dialog'], function () { |
mw.loader.using(['jquery.ui.dialog'], function () { |
||
$( 'a' ).click( function( e ) { |
$( 'a' ).click( function( e ) { |
||
Line 21: | Line 28: | ||
</script> |
</script> |
||
</html> |
</html> |
||
[http://google.com] |
Revision as of 23:32, 27 December 2012
<html>
This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.
<a href="#">Test</a> <script> mw.loader.using(['jquery.ui.dialog'], function () { $( 'a' ).click( function( e ) { $( '#dialog' ).dialog({ resizable: false, buttons: { "Leave Feedback Now": function() { $( this ).dialog( window.location.href = 'https://meta.wikimedia.org/w/index.php?title=Foundation_wiki_feedback&action=edit§ion=new&preloadtitle=wikimediafoundation.org' ); }, "Close": function() { $( this ).dialog( "close" ); } } }); e.preventDefault(); }); }); </script> </html>