Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>Test Page</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  body {
    font-family: sans-serif;
  }
  p {
    margin: 0px;
  }
</style>
<script>
// Note that this script is after the ones loading
// jQuery and jQuery UI, but before the content.
// We use jQuery's `ready` function (indirectly, by
// passing a function into `jQuery`) to tell jQuery
// to run our code after the DOM is ready.
jQuery(function($) {
  $("#dialog").dialog({
    autoOpen: false
  });
  
  $(".clickme").click(function () {
    var title = $(this).data("dialogtitle");
    $("#dialog").dialog("option", {title: title});
    $("#dialog").dialog("open");
  });
});
</script>
</head>
<body>
<div class="clickme" data-dialogtitle="Foo">First Button</div>
<div class="clickme" data-dialogtitle="Bar">Second Button</div>
<div id="dialog" title="Basic dialog">
<p>I'm the dialog.</p>
</div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers