When I call the .slideToggle()
method of jQuery 1.7.2, the input element lose its placeholder and its position is broken. It's gone to the top of the screen.
The CSS:
$("#go").click(function(){
$("#second").slideToggle("slow");
});
The HTML:
<input type="text" id="first" placeholder="first" />
<input type="text" id="second" placeholder="second" style="display: none;" />
<button id="go">Go</button>
When I try to inspect this element in Google Chrome the placeholder goes back and styles are normalized.
Why does this happen?