Created
January 19, 2010 20:14
-
-
Save jpzwarte/281250 to your computer and use it in GitHub Desktop.
Splitpane using jQuery UI
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
$('.splitter').draggable({ | |
axis: 'x', | |
containment: '#content', | |
distance: 0, | |
drag: function(event, ui) { | |
var width = $('#content').width(); | |
$('#content .leftpane').css({ width: ui.position.left + 'px' }); | |
$('#content .rightpane').css({ | |
left: ui.position.left + 1 + 'px', | |
width: (width - ui.position.left + 1) + 'px' | |
}); | |
}, | |
refreshPositions: true, | |
scroll: false | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment