Created
September 18, 2018 13:12
-
-
Save Hypersapien/1c38b7124d4f82cda5820770515718a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
<style type="text/css"> | |
* { | |
box-sizing: border-box; | |
} | |
#container { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
} | |
#left_pane, | |
#right_pane { | |
top: 0; | |
height: 100%; | |
position: absolute; | |
padding: 10px; | |
color: black; | |
} | |
#left_pane { | |
width: 25%; | |
left: 0; | |
background: lightgrey; | |
border-right: 2px solid black; | |
} | |
#right_pane { | |
width: 75%; | |
right: 0; | |
background: white; | |
} | |
</style> | |
<script src="https://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script> | |
<script src="https://code.jquery.com/ui/1.9.2/jquery-ui.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="container"> | |
Container | |
<div id="left_pane" class="ui-widget-content">Left pane</div> | |
<div id="right_pane">Right pane</div> | |
</div> | |
<script type="text/javascript"> | |
$("#left_pane").resizable({ | |
handles: 'e', | |
resize: function() { | |
$("#right_pane").outerWidth($("#container").innerWidth() - $("#left_pane").outerWidth()); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment