7 Years
Discussion Span
Last Post by canterorist

the slide function in jQuery won't allow you to slide horizontally, only veritcally.. to slide horizontally you must use the animate function

let's say you have a link and when you click it you want an image that is a child of the <a> tag to toggle slide.. here is how you would code it


since you can't have two functions on click you have to put slideToggle which is the same as slideDown and slideUp but in one fuction....

here is a link to a blog post i wrote that will help you make a dropdown menu using slideDown and slideUp on hover

blog post

hope this'll help you

Edited by bvelez352: n/a


thanks bvelez352 for your sample code. I really appreciate it, but do you have sample code in animate function?
thanks in advance



Let's say you have a div that when you click a link you want the width to toggle from 0 to 150px with an animate function



i wrote this from the top of my head, so if you get any problem, let me know.


thank you bvelez352 for your time in giving me a sample code. I will try this at home.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.