改变div的高度
我有以下脚本,双击该脚本,我想更改其高度。我向下拖动 div 直到它达到 200px 高度,但是当我双击手柄时,它不会回到 0px。
不确定我做错了什么?
I have the following script which has a double click, on which I would like to change the height. I drag the div down until it is 200px heigh, but when I double click the handle, it will not go back to 0px.
Not sure what I am doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
像这样?
http://jsfiddle.net/rYFEY/33/
这是新的事件处理程序。我只添加了一行:
Like this?
http://jsfiddle.net/rYFEY/33/
This is the new event handler. I added just one line:
希望有帮助。
Hope it helps.
这似乎在 FF 中有效:
This seems to work in FF:
试试这个
http://jsfiddle.net/rYFEY/38/
Try this
http://jsfiddle.net/rYFEY/38/
毫米我似乎找不到重置大小的默认函数,因此 我只是手动将 div 高度设置回零。< /a>
因此,如果这是您要使用的方式并且您想保持更复杂的行为,那么我认为您会手动将先前的高度、宽度等保留到变量中,并根据事件再次手动设置它们触发。
mm i can't seem to find the default function to reset the size thus i just manually set the div height back to zero.
so if this is the way you're going with and you want to keep more complicated behavior, then i would think you would to manually keep the previous height, width, etc into variables and manually set them again depending on the event triggered.