如何知道在jquery可调整大小中正在使用哪个句柄 [英] How to know which handle is getting used in jquery resizable

查看:62
本文介绍了如何知道在jquery可调整大小中正在使用哪个句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用可调整大小的jQuery来调整div的大小

i am using jquery resizable to resize a div

$("#mainDiv").resizable({
        handles: 's, e',
        start: function(event, ui) { 
        // want to perform some action here
    },
        resize: function(event, ui) { 
        // want to perform some action here }
    });

现在我想基于以下事实进行操作:选择s还是e来调整大小,基本上,调整大小是垂直还是水平

now i want to do some stuff based on fact that whether s or e is selected to resize basically resizing is vertical or horizontal how to do that

谢谢

推荐答案

将轴作为数据放置在元素上的ui-resizable下,如下所示:

The axis is placed as data on your element under ui-resizable like this:

$(element).data('ui-resizable').axis

这篇关于如何知道在jquery可调整大小中正在使用哪个句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆