Mark Gibson wrote:
> Stephen Woodbridge wrote:
>> Hi Stefan,
>>
>> I have been trying your resize plugin, it is really slick and works great!
>>
>> I have a request, does it already have or can you add the ability to 
>> added a call back at the end of the resize, so other code can be 
>> notified of the change in size? Like notify below:
>>
>> $(document).ready(function(){
>>      $('#resize_map').Resizeable(
>>          {
>>              minHeight: 100,
>>              maxHeight: 700,
>>              minWidth: 100,
>>              maxWidth: 800,
>>              handlers: {
>>                  se: '#resize'
>>              },
>>              notify: function(){
>>                  alert("I have been resized");
>>                  $('#map_tag').Resized(this.sizes);
>>              }
>>          }
>>      );
>> });
>>
>> Maybe there is another way to do this?
> 
> Would this not be better suited to an event?
> 
> $('#resize_map').bind('resize', function() {
>      alert("I have been resized");
> });
> 
> 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

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to