Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 320
Don P Avatar asked Feb 14 '23 09:02

Don P


1 Answers

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/

like image 179
Andy Avatar answered Feb 17 '23 03:02

Andy