Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/cupertino/jquery-ui.css">
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>  
      
<meta charset=utf-8 />
<title>JS Bin</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; }
</style>
</head>
<body>
  <div class="dialog">
      Dialog? <<<<<Yep!></Yep!></Yep!></Yep!></Yep!></Yep!>
  </div>
  
  
  <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
    <span tabindex="0" class="ui-dialog-title" id="ui-dialog-title-dialog">Dialog Title</span>
    <a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button">
    <span class="ui-icon ui-icon-closethick">close</span></a>
</div>
</body>
</html>
 
$(function(){
  var dialog = $('.dialog').dialog();
  dialog.dialog('option', 'title', $('<span style="color: red !important">I\'m a title and I\'m OK</span>').html());
});
 $('.ui-dialog-titlebar').mouseup(function () {
    alert($(this).children('#ui-dialog-title-dialog').text());
});
 
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers