Jump to content

jQuery resizeable


skippt

Recommended Posts

Hi,

 

I'm currently trying to build a script that will allow two divs to sit next to each other and move when resized.

 

The code I have so far is here:

http://jsfiddle.net/7BSrL/6/

 

I would like it the second div to move to the right when the first div is resized and if the div gets too large for the container, the second div should move below the first div.

 

Could anyone teach me how to do this please?

Link to comment
https://forums.phpfreaks.com/topic/285296-jquery-resizeable/
Share on other sites

You're putting too much constraints on the style properties. Try this:

 

#resizable {
    width:75px;
    height: 75px;
    padding: 0em;
    position:relative;
    float:left;
    border: 1px solid #ccc;
}
 #resizable2 {
    width:75px;
    height: 75px;
    padding: 0em;
    position:relative;
    float:left;
    border: 1px solid #ccc;
}
.ui-resizable-helper {
    border: 2px dotted #00F;
}
#containment-wrapper {
    width: 95%;
    height:150px;
    white-space:nowrap;
    border:2px solid #ccc;
    overflow:hidden;
}
Link to comment
https://forums.phpfreaks.com/topic/285296-jquery-resizeable/#findComment-1464887
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.