Skip to content

Instantly share code, notes, and snippets.

@jpzwarte
Created January 19, 2010 20:14
Show Gist options
  • Save jpzwarte/281250 to your computer and use it in GitHub Desktop.
Save jpzwarte/281250 to your computer and use it in GitHub Desktop.
Splitpane using jQuery UI
$('.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