Jump to content

jQuery 3.0 Alpha - Attention: the behavior of .show() and .hide() methods has changed!


Recommended Posts

Posted

http://blog.jquery.com/2015/07/13/jquery-3-0-and-jquery-compat-3-0-alpha-versions-released/

Please check your code for how you use the .show() and .hide() methods!

I did a quick grep for a 2.6.9 site (has a dozen random modules) and the .js files listed below were using .show(). It might well be that some of them will break with jQuery 3.0.

BatchChildEditor.js

ProcessBatcher.js

AdminThemeReno\scripts\main.js

InputfieldFile.js

InputfieldPageAutocomplete.js

InputfieldSelector.js

JqueryTableSorter\widgets.js

JqueryWireTabs.js

ProcessField.js

ProcessModule.js

ProcessPageAdd.js

ProcessPageEditImageSelect.js

ProcessPageEditLink.js

ProcessPageList.js

ProcessPageLister.js

ProcessPageSearch.js

ProcessTemplate.js

SystemNotifications\Notifications.js

templates-admin\scripts\inputfields.js

templates-admin\scripts\main.js

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.
  • Like 6
×
×
  • Create New...