How can I detect event when messagebar texterea resize?

I want a function when the texterea messagebar resize it will fire the event.
I thought you could do this like below. But it doens’t work. How Can I fix this?
Thanks :slight_smile:

$$(document).on(‘messagebar:resizepage’, function() {
alert(‘hello world!’);
});

	<div class="toolbar messagebar" id="messing">
		<div class="toolbar-inner">
			<div class="messagebar-area">
				<textarea placeholder="Add a comment..." onkeyup="tagFriends();" id="tagfriend" class="resizable" style="font-size: 14px;"></textarea>
			</div>
			<a href="#" class="link" @click="sendMessage">
				<i class="icon f7-icons ios-only">paper_plane</i>
			<span class="link send-link" style="font-weight: 400; margin-left: -5px; font-size: 17px;">Send</span>
			</a>
		</div>
	</div>

Are you trying to fire off an event when the page resizes or the message bar?

If its the messagebar you could bind to the on event for the message bar, otherwise if you are looking for page resize you could add an event listener for the window resize like

window.addEventListener('resize', yourfunction);
1 Like