]> source.dussan.org Git - jquery-ui.git/commit
All: Remove usage of jQuery positional selectors
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Wed, 22 Jan 2020 15:44:34 +0000 (16:44 +0100)
committerGitHub <noreply@github.com>
Wed, 22 Jan 2020 15:44:34 +0000 (16:44 +0100)
commit0c860b0d92f9959f6747f8c02e9671eb2fc561aa
treeeec1af4f3a9eead707e2674593bda620b5f7c9cb
parent3481f50bfcf02865857d390a1caa511003a40c13
All: Remove usage of jQuery positional selectors

jQuery positional selectors () have been deprecated in
[jQuery 3.4.0](https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/)
and they'll be removed in jQuery 4.0.0. This PR removes their usage.

Most of the changes were possible without changing public API. However,
dropping `:even` usage required a change to the
[`header` option](https://api.jqueryui.com/accordion/#option-header)
of the accordion widget. I made it an optional function; this will need
to be documented.

The polyfill for `.even()` & `.odd()` is added for jQuery <3.5.0. There was
no usage of the :odd selector in the code but the `.odd()` method is also
polyfilled for completeness.

Closes gh-1904
23 files changed:
demos/position/cycler.html
tests/lib/bootstrap.js
tests/unit/accordion/common.js
tests/unit/accordion/core.js
tests/unit/accordion/options.js
tests/unit/datepicker/core.js
tests/unit/datepicker/options.js
tests/unit/dialog/core.js
tests/unit/menu/core.js
tests/unit/menu/events.js
tests/unit/menu/helper.js
tests/unit/menu/methods.js
tests/unit/sortable/core.js
tests/unit/sortable/events.js
tests/unit/sortable/options.js
tests/unit/spinner/options.js
tests/visual/compound/draggable_resizable.html
tests/visual/effects/effects.js
tests/visual/selectmenu/selectmenu.html
ui/jquery-1-7.js
ui/widgets/accordion.js
ui/widgets/datepicker.js
ui/widgets/dialog.js