Handle the resizestop event:
http://docs.jquery.com/UI/Resizable#event-stop
Inside the stop callback, you can use $(this).width() and $(this).height()
or ui.size:
$('#myDiv').resizable({
stop: function(event, ui) {
var newWidth = $(this).width(), newHeight = $(this).height();
//or
var newWidth = ui.size.width, newHeight = ui.size.height;
}
});
- Richard
On Sun, Aug 16, 2009 at 5:33 PM, [email protected] <
[email protected]> wrote:
>
> Hi all,
> i have a resizable (grid 50) div with a background image.
>
> When i resize, i want to change my background image, like:
> bg400.png for bg350.png.
>
> But how do i detect the new heigth/width and how do i replace the
> background image?
>
> Thanks in advance for any answer!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---