Growfield events

Growfield events

Trying to get the growfield plugin onHeightChange event to trigger with the following script but it wont work

$(document).ready(function(){
$("#chat_message_post").growfield({
restore:true,
events:{onHeightChange:
function(){
alert('hi');
}
}
});
});

I dont get any errors, but it doesnt alert the message like I expect

Taken from the growfield API
(http://kuindji.com/jquery/growfield/growfield.xml)

events

The following events can be bound to by specifying them as options or just binding to a jquery event...

  • onHeightChange - Triggered whenever the height of the growfield changes.
  • onRestore - The textarea just restored itself to the initial height.
  • onGrowBack - The textarea just grew back to the pre-restore state.

I'm not sure if I understood the event properly, can anybody give me any help?

edit: I also tested this instead
$("#chat_message_post").growfield({onHeightChange:function(){alert('hi')}});