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

kevbob650Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robert SchuttSoftware EngineerCommented:
The simplest fix I can think of (but I don't know jquery-ui all that well) is to set the left coordinate using the width of the left div, working example here: http://schutt.nl/ee/Q_28635405/
<script>
var reposition = '';
$(document).ready(function() {
    $( ".left" ).resizable({
            handles: { 'e': '#resizer' },
            resize: function(event, ui){
                reposition = ui.position;
                var leftpos = $('.left').position();
                $('#resizer').css('left', $('.left').width() + 'px');
                $('.right').css('left', (leftpos.left + $('.left').width() + $('#resizer').width()) + 'px');
            }
    });
});

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevbob650Author Commented:
You the man!  Thanks so much, works perfect.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.