jquery: slideDown, show and more stopped working for `display: none` elements
Test case -
<!doctype html>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<style>
div, p { display: none }
</style>
<div>stuff<br/>that<br/>takes<br/>a<br/>height</div>
<p>stuff<br/>that<br/>takes<br/>a<br/>height</p>
<script>
$("p").show();
$("div").slideDown();
</script>
Changing jquery-git2
to jquery-2.1.1
fixes the issue. This is a regression.
This is caused by https://github.com/jquery/jquery/commit/86419b10bfa5e3b71a7d416288ab806d47a31d1f
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 51 (31 by maintainers)
Commits related to this issue
- CSS: Restore cascade-override behavior in .show Fixes gh-2654 Fixes gh-2308 Ref 86419b10bfa5e3b71a7d416288ab806d47a31d1f — committed to gibson042/jquery by gibson042 8 years ago
- CSS: Restore cascade-override behavior in .show Fixes gh-2654 Fixes gh-2308 Close gh-2810 Ref 86419b10bfa5e3b71a7d416288ab806d47a31d1f — committed to timmywil/jquery by gibson042 8 years ago
Wow, don’t use jquery-git.js in production, ever.