【发布时间】:2013-11-24 11:02:55
【问题描述】:
我需要一些帮助。我试图在javascript中创建一个条件来显示一个div,然后对象被调整大小并具有我需要的宽度和高度。
这是我的代码
HTML
<img id="image1" src="img/object1" width="107" height="30">
<img id="image2" src="img/onject1" width="107" height="240">
Javascript
$("#image2").hide();
$( "#image1" ).resizable({ maxHeight: 240 , maxWidth : 107 , minWidth: 107});
所以我需要这样的东西
$('#image1').click(function(){
if $('#image1') have height 240 and width 107
show $('#image2')
);
但我不知道如何写这个条件。请帮帮我。
当 image1 调整为高度 240 和宽度 107 时,是否有可能自动显示 image2 ?
谢谢
对不起,我的英语不好。
【问题讨论】:
标签: javascript jquery html css jquery-ui