如何更改 .toggle() 上的展开方向? [英] How to change the expand direction on .toggle()?
问题描述
我正在使用 .toggle() jquery 进行展开/折叠.
I am using .toggle() jquery for expand/collapse.
您知道如何将展开/折叠方向从下到上更改,而不是从左上到右下吗?我不是 jquery 专家,我找到了演示并使用了这些代码...
Do you know how to change the expand/collapse direction from bottom to top instead of top-left to bottom-right? I am no jquery expert, I found the demo and use these codes...
这是我的工作文件:http://www.streetlightministries.ca/2013 - 然后点击右上角的时间和地点".您会看到它从左上角扩展到右下角.我宁愿让它从下往上扩展.
Here is my working file: http://www.streetlightministries.ca/2013 - and click "Times & Location" on the top right corner. You will see it expanding from top-left to bottom-right. I rather to have it expand from bottom to top.
如果您能帮助我,我将不胜感激!
I would be really appreciate if you are able to help me out!
谢谢
推荐答案
对于初学者,我会使用 .slideToggle()
而不是 .toggle()
.它只是一个简单的折叠和展开.先尝试一下,看看你是否更喜欢这个结果.
For starters, I would use .slideToggle()
instead of .toggle()
. It just a simple collapse and expand. Try that out first and see if you like that result better.
这篇关于如何更改 .toggle() 上的展开方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!