5 drag: function(event) {
6 $.resizable.element.element.css({
7 width: Math.max(event.pageX - $.resizable.element.mouseX + $.resizable.element.width,
8 $.resizable.settings.minWidth)
10 $.resizable.element.element.trigger('resizable:resize');
13 stop: function(event) {
14 $.resizable.element.element.trigger('resizable:stop');
15 $(document).unbind('mousemove', $.resizable.drag).unbind('mouseup', $.resizable.stop)
16 $('body').css('cursor', 'auto');
21 $.fn.resizable = function(options) {
24 maxWidth: $(window).width()
27 $.extend(settings, options);
29 var element = $(this);
30 var handle = $('.panel-slider', element)
32 handle.mousedown(function(event) {
33 var position = element.position();
34 console.log('Mouse down on position: ' + position);
35 /* from this point on, the panel should resize events */
37 /* $.resizable.settings = settings;
40 width: parseInt(element.css('width')) || element[0].scrollWidth || 0,
44 $(document).mousemove($.resizable.ondrag, element).mouseup($.resizable.stop, element);
45 /* $('body').css('cursor', 'col-resize'); */
48 /* stop drag events */
49 handle.bind('dragstart', function(event) { event.preventDefault(); })
50 .bind('drag', function(event) { event.preventDefault(); })
51 .bind('draggesture', function(event) { event.preventDefault(); });