How can I get the blue box to scale with the red one? (using jQuery-UI)

如何将蓝色框与红色框一起缩放? (使用jQuery-UI)

http://jsfiddle.net/Y54EB/1/

http://jsfiddle.net/Y54EB/1/

This is the basic code, CSS:

这是基本代码,CSS:

#outer {
    position:relative;
    height:100px;
    width:150px;
    z-index:1;
    background:#F00;
}
#nested {
    position:absolute;
    left:50px; top:20px;
    width:50px; height:20px;
    z-index:2;
    background:#00F;
    cursor:pointer;
}

And HTML:

和HTML:

<div id="outer">
<div id="nested" onclick="$('#outer').effect('scale', {scale:'content',percent:50}, 1000);" />
</div>

4 个解决方案

#1


3

I realize this is old, but if I understand you correctly, I was trying to achieve the same thing and came across this jQuery plugin that does the job:

我意识到这是旧的,但如果我理解正确,我试图实现同样的事情,并遇到了这个jQuery插件,它完成了这项工作:

https://github.com/heygrady/transform/wiki

https://github.com/heygrady/transform/wiki

更多相关文章

  1. Emmet插件快速编写html小技巧
  2. html提示框插件
  3. Wordpress主题调试:插件侧边栏导致原始侧边栏不显示
  4. Ajax上传插件。handleError未找到
  5. 使用AJAX与拖放jQuery插件
  6. weiphp插件开发注意
  7. 如何将Composer中的CakePHP插件安装到app / Plugin中
  8. jQuery通过igorescobar jQuery掩码插件验证电话号码输入。
  9. 记12306货运系统“抢订空车”插件的编写--订车流程梳理

随机推荐

  1. Android 各版本Gradle离线下载
  2. android生命周期_Android活动生命周期–
  3. Android(安卓)API Demos笔记
  4. Android 实现开关灯效果
  5. android:shape的使用 (android用xml文件生
  6. Android android下的电话拨号器
  7. Android应用程序签名
  8. Android支付宝接口集成
  9. Android之拍照
  10. Android Studio项目适配Android X(Androi