whatgoodisaroad / validity

Client-Side Validation for jQuery
http://whatgoodisaroad.github.io/validity/
132 stars 75 forks source link

hide() / show() changed in jquery 3 - breaks summary output #76

Open markvantilburg opened 9 years ago

markvantilburg commented 9 years ago

Breaking change in jquery 3

http://blog.jquery.com/2015/07/13/jquery-3-0-and-jquery-compat-3-0-alpha-versions-released/ "So, instead, we’re experimentally defying the evolution of these methods and reverting to a simple, primordial model. This will break some code. If you have elements in a stylesheet that are set to display: none, the .show() method will no longer override that. So the most important rule for moving to jQuery 3.0 is this: Don’t use a stylesheet to set the default of display: none and then try to use .show() – or any method that shows elements, such as .slideDown() and .fadeIn() – to make it visible.

If you need an element to be hidden by default, the best way is to add a class name like “hidden” to the element and define that class to be display: none in a stylesheet. Then you can add or remove that class using jQuery’s .addClass() and .removeClass() methods to control visibility. Alternately, you can have a .ready() handler call .hide() on the elements before they are displayed on the page. Or, if you really must retain the stylesheet default, you can use .css("display", "block") (or the appropriate display value) to override the stylesheet."

markvantilburg commented 9 years ago

Could you also update the build?