Link to home
Start Free TrialLog in
Avatar of kevbob650
kevbob650Flag for United States of America

asked on

Jquery UI Resizable with Custom Handles

I have a webpage with two columns and a customer resizable handle on the left column. The handle resizes the div correctly but it does not move with the resizing, it stays in it's original position throughout the resizing. I would also like the resizing to "push" the right column as it resizes the left column which it doesn't do.   any help would be appreciated!

<html>
<div class="outer">
    <div class="left">Left Column
        <div id="resizer" class="ui-resizable-handle ui-resizable-e"></div>
    </div>
    <div class="right">Right Column</div>
</div>

Open in new window

<css>
.left {
    position:absolute;
    left:20px;
    top:20px;
    background-color:#F1F1F1;
    width:200px;
    height:600px;
}
#resizer {
    position:relative;
    left:200px;
    top:0px;
    float:left;
    background-color:#336699;
    width:10px;
    height:600px;
    cursor:w-resize;
}
.right {
    position:absolute;
    left:230px;
    top:20px;
    width:300px;
    height:600px;
    background-color:#DDDDDD;
}

Open in new window

<script>
var reposition = '';
$(document).ready(function() {
    $( ".left" ).resizable({
            handles: { 'e': '#resizer' },
            resize: function(event, ui){
                reposition = ui.position;
            }
    });
});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kevbob650

ASKER

You the man!  Thanks so much, works perfect.