alsoResize problem
alsoResize problem
Hi all,
i have several nested div sections, used for border effects for a
square game board. This game board is resizable.
The outer div is resizable, all others should resize too when resizing
the outer div.
But not all nested div's are resizing too?
I have used the next code:
<!--
used divs in following order
<div id="bordwrapper">
<div id="bordContainer">
<div id="buitenrand">
<div id="middenrand">
<div id="binnenrand">
<div id="bordframe">
-->
<script type="text/javascript">
$(function() {
$("#bordwrapper").resizable({
alsoResize: '#bordContainer',
alsoResize: '#buitenrand',
alsoResize: '#middenrand',
alsoResize: '#binnenrand',
alsoResize: '#bordframe',
maxHeight: 550,
maxWidth: 550,
minHeight: 300,
minWidth: 300,
aspectRatio: true,
grid: 50,
stop: function(event, ui) {
// square image, so just one size needed
var newWidth = $(this).width();
//use the image with right size, grid = 50....;
$(this).css({'background-image' : 'url(images/bord/bg' + newWidth
+ '.png)'});
//test: not working
//$("buitenrand") .css("width","385");
}// end event ui
});
});
</script>
First i was thinking to change the css of nested div's, but i cant get
that working too...
The only thing what really works, is changing the background image for
the right one, after resizing.
Please, help is really appreciated!