tags:

views:

211

answers:

1

When use slideup/slidedown and when use slidetoggle? is slidetoggle have problem with ie?

+1  A: 

You should use slideToggle() when you have a single trigger for an element that you want to slide up or down and you always want it to do one or the other depending on the current state of that element.

You should use slideUp() or slideDown() if you have either multiple triggers or multiple effects. For example:

You want clicking on a link to make a div slide down, but then the user needs to click on the actual div to slide it back up (multiple triggers).

You want clicking on a button to make the div slide down, but you want clicking on the button again to cause it to fade away (multiple effects).

But if you are using slideUp and SlideDown together for the same trigger/event, you are basically just doing slideToggle but making it harder on yourself.

I am not sure if there is problem with IE and slideToggle. But I imagine if there is a problem with slideToggle there is a problem with either slide effects also.

Anthony