Stephen Woodbridge wrote:
> Mark Gibson wrote:
>> I've not had chance to test it, but I'm sure all elements
>> have a resize event. If not then the resizeable plugin can
>> trigger() it itself.
>
> Hi Mark,
>
> I tried to do this like this:
>
> $(document).ready(function(){
> $('#resize_map').Resizeable(
> {
> minHeight: 100,
> maxHeight: 700,
> minWidth: 100,
> maxWidth: 800,
> handlers: {
> se: '#resize'
> }
> }
> );
> $("#resize_map").bind('resize', function(e) {
> alert("resized event");
> });
> });
>
> But no event fires :(, I have also tried:
>
> $("#resize_map").resize(function(e) {
> alert("resized event");
> });
>
> $("#resize_map").trigger('resize'); does force the event to fire.
>
> I can add the trigger('resize') to the resizable plugin, but it seems
> like it should just fire. Any other thoughts?
Steve,
After a quick flick through JavaScript, The Definitive Guide and a
few online docs, it seems that the resize event only applies to
window size changes.
So you'd have to manually trigger the event.
Also, I've noticed that trigger appears to be broken for IE in the
latest jquery download r501! - but is fixed in SVN.
BTW, you can just chain the bind:
$('#resize_map')
.Resizeable({
...
})
.bind('resize', function(e) {
alert("resized event");
});
- Mark.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/