Below is the HTML snippet I am working with:
<div class="text">bla bla bla bla</div>
<div class="button">Show</div>
Here is the corresponding CSS:
.text{
height:100px;
overflow:hidden;
}
Imagine the .text
div
contains a lot more text than can fit in a 100px height area.
My question is, how can I use slideDown()
to reveal the hidden text when the button is clicked?
Simply using $(".button").slideDown();
won't work because I first need to remove the height limit and then run slideDown()
, which also does not yield the desired result.