jqueryjquery-uijquery-layout

jQuery UI layout on a container div instead of body


I'm using jQuery UI layout. I want to apply the layout to a container, not the entire body.

Works when I do $('body').layout();.

http://jsfiddle.net/JPEaa/216/

Fails when I add a container div and do $('.myDiv').layout();.

http://jsfiddle.net/JPEaa/217/

Am I selecting or applying my container incorrectly?


Solution

  • You container needs to have an explicit size set. If you add height to your .myDiv it works:

    <div class="myDiv" style="height:400px">
    

    http://jsfiddle.net/JPEaa/223/