JSFiddle - React, Tailwind, and code Playground
by tebrown
HTML
<html>
<head>
<title>Bootstrap Modal Demo</title>
<!-- http://scripting.com/stories/2012/01/11/bootstrapModalDemo.html -->
<script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.js"></script>
<link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.css" rel="stylesheet">
<body>
<div class="divDemoBody">
<div id="windowTitleDialog" class="modal hide fade">
<div class="modal-header">
<a href="#" class="close">×</a>
<h3>Add Player</h3>
</div>
<div class="modal-body">
<div class="divDialogElements">
<input class="xlarge" id="xlInput" name="xlInput" type="text" />
</div>
</div>
<div class="modal-footer">
Text
</div>
</div>
<div class="divButton">
<button data-controls-modal="windowTitleDialog" data-backdrop="true" data-keyboard="true" class="btn danger" onmouseover="sandwich='pastrami';">Launch Modal</button>
</div>
</div>
</body>
JavaScript
$(document).ready(function() {
$('#windowTitleDialog').bind('show', function () {
document.getElementById ("xlInput").value = document.title;
});
});
function closeDialog () {
$('#windowTitleDialog').modal('hide');
};
function okClicked () {
document.title = document.getElementById ("xlInput").value;
closeDialog ();
};