【问题标题】:get the 100px area where the mouse is clicked获取鼠标点击的100px区域
【发布时间】:2013-05-02 13:21:15
【问题描述】:

我在网页上有图表,所以我想添加放大/缩小功能。 我的图表在 jquery 选项卡内。因此,当用户想要缩放应该缩放的选项卡内的特定页面区域时。 例如:当用户双击页面和选项卡内以缩放 100 像素乘以 100 像素的区域时,应进行缩放。双击放大,单击缩小

请指导我如何做到这一点。

提前致谢!

【问题讨论】:

  • 你的代码在哪里??

标签: javascript jquery


【解决方案1】:

试试这个:

$('#targetDiv').on('dblclick',function() {
    $(this).width('100px');
    $(this).height('100px')
});

$('#targetDiv').on('click',function() {
    $(this).width('50px');
    $(this).height('50px')
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-12
    • 1970-01-01
    • 2010-12-10
    • 1970-01-01
    • 1970-01-01
    • 2016-04-14
    • 2015-08-14
    • 2011-04-20
    相关资源
    最近更新 更多