Hi all,
I'm having problems when I get the css "top" attribute of a Resizable
DIV after the resize, I think after the resize jQuery UI sets the
Resizable DIV css attribute "position" to "absolute", so I get a big
value (209px) when I spect 15px.
Here's some code:
<html>
<body>
<h1>title</h1>
<h2>sub title</h2>
<div id="container">
<div id="zone_1">xxx</div>
</div>
</body>
</html>
$(document).ready( function() {
alert( $("#zone1").css('top') ); // this must be 0px, because
"zone1" is at the top of "container".
$("#zone1").resizable( {
knobHandles: true,
handles: "all",
minWidth: 50,
minHeight: 50,
stop: function(evn, ui) {
alert( $(this).css('top') ); // If zone1 is at the top of
"container" I spect to have a "top" value of "0px", but I get a lot
more.
}
} );
} );
I try to solve this by subtracting the "offset top" attribute of the
"container" to the css attribute "top" of the "zone1", and making it's
position "relative" but doesn't work as I spect:
$("#zone1").css('top', $("#zone1").css('top') - $("#container").offset
().top );
$("#zone1").css('position', 'relative');
Any ideas?
thank you!
Cheers,
Pablo.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---