slideDown, show and more stopped working for `display: none` elements
See original GitHub issueTest 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
Issue Analytics
- State:
- Created 8 years ago
- Comments:51 (31 by maintainers)
Top Results From Across the Web
slideUp() not working on elements in a CSS "display:none ...
If the parent has display:none; then you'll need to show it before trying to slideUp the child. You can do this with the...
Read more >jQuery 3.0 breaking changes to hide() and show()
Removing “hide” fixes this, but the element is no-longer hidden by default. Replacing the 'hide' class with display: none on the element is ......
Read more >Animating from "display: block" to "display: none"
When the element is invisible, first make it display: block , then (while it's still visually hidden, but existing on the page), animate...
Read more >jQuery | slideDown() Method - GeeksforGeeks
It works on two types of hidden elements: Elements hidden using jQuery methods. Elements hidden using display: none in CSS. Syntax: $(selector).
Read more >.slideToggle() | jQuery API Documentation
If an element has a display value of inline , then is hidden and shown, it will once again be displayed inline ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wow, don’t use jquery-git.js in production, ever.
BTW. Surprisingly most of jQuery UI works. Only dialogs and drop-downs don’t like jQ3.