harnish
harnish

Reputation: 77

slideToggle(), toggle div up and push the above div

Here's JSFiddle

Everything's explained there in the fiddle.

Here, div is toggling below, but what i want is div should toggle upwards and push the above div up. i.e. the div which is there with text will go up as heading.

Thanks

Upvotes: 0

Views: 1484

Answers (2)

Chris Clower
Chris Clower

Reputation: 5104

This should do it for ya: http://jsfiddle.net/JftGd/2/

What I did was wrapped the paragraphs in a div, and added a .slideToggle() to that div in the click event function.

Hope this is what you were looking for :)

Upvotes: 3

Roest
Roest

Reputation: 818

Put the the text in another div and also slide toggle it.

Upvotes: 0

Related Questions