开发者

jQuery UI - I want to check if a resize event was triggered on a resizable div

I have two divs $('.list') and $('.content') side by side. $('.list') is resizable using jQuery UI resizable and $('.content') is bound to the alsoResize.

The problem I am having is I need to know when the resizable ev开发者_开发百科ent is triggered. .bind('change') or .bind('resize') don't work because resize is only for the window/frame and 'change' seems to be an IE only event.

The solution I had in mind was to actively 'watch' for any changes to the width of the $('.list') div and trigger an event but I'm not sure how to go about doing this.

What I can't do is put this inside the resize event because it has to live inside an independent jQuery plugin. I want the jQuery plugin to watch for any changes.

Thanks!


I am not very sure but did you try this. I found it in the documentations in the jquery ui website:

$( ".selector" ).resizable({     resize: function(event, ui) { ... }   });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜