slidetoggle

jquery .slideToggle() horizontal alternative?

穿精又带淫゛_ 提交于 2019-11-26 22:07:50
slideToggle does exactly what I want, only I want the slide to be horizontal. I now have an horizontalhide/show and animation on click, but I would like to have the toggle options. So that when I click on the active link, it will play the animation reversed and hide itself. What would be the best way to do this? You can use the animate method: $('#element').animate({width: 'toggle'}); http://jsfiddle.net/7ZBQa/ Created a fiddle http://jsfiddle.net/powtac/RqWk2/ $("div").animate({width: 'toggle'}); There is another way, to use jquery ui. See api jquery ui but it may not be always useful as it

jquery .slideToggle() horizontal alternative?

别来无恙 提交于 2019-11-26 08:10:40
问题 slideToggle does exactly what I want, only I want the slide to be horizontal. I now have an horizontalhide/show and animation on click, but I would like to have the toggle options. So that when I click on the active link, it will play the animation reversed and hide itself. What would be the best way to do this? 回答1: You can use the animate method: $('#element').animate({width: 'toggle'}); http://jsfiddle.net/7ZBQa/ 回答2: Created a fiddle http://jsfiddle.net/powtac/RqWk2/ $("div").animate(

slideToggle in table row

无人久伴 提交于 2019-11-26 06:07:18
问题 does slideToggle work with table? I want to slideToggle a row of a table. but it just appears without any effect. 回答1: SlideToggle does work with table rows, it just kind of sucks. If you have a table row with a height larger than it's minimum - like this <tr height="30%"> Then slidetoggle will do a smooth slide down until the reaches it's minimum height... then it will dissapear immediately like you used $("#tr").hide(); I've made a jsfiddle demonstrating this at http://jsfiddle.net/BU28E/1/