JSFiddle - React, Tailwind, and code Playground
by editedredx
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css">
<div id="test">test</div>
JavaScript
$("#test").dialog({
minHeight: 200,
maxHeight: 300,
width: 300,
buttons: {
"meer": function() {
//test
}
},
open: function() {
var $this = $(this);
var max = $this.dialog("option", "maxHeight");
var min = $this.dialog("option", "minHeight");
$this.html("test<br /><br />test<br /><br />test<br /><br />test<br /><br />test<br /><br />test<br /><br />test<br /><br />test<br /><br />test");
var height = $this.parent().height();
if (height > (max-10)) {
height = max;
} else if (height < min) {
height = min;
}
$this.dialog("option", "height", height);
}
});