Skip to content

All: Don't use jQuery positional selectors in examples #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
All: Don't use jQuery positional selectors in examples
Positional selectors are deprecated and will be removed in jQuery 4.0.

See https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/
  • Loading branch information
mgol committed Sep 2, 2021
commit 446244f5cb675fba8316e18fd20dc53fbf9a04ae
2 changes: 1 addition & 1 deletion entries/autocomplete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ _renderMenu: function( ul, items ) {
$.each( items, function( index, item ) {
that._renderItemData( ul, item );
});
$( ul ).find( "li:odd" ).addClass( "odd" );
$( ul ).find( "li" ).odd().addClass( "odd" );
}
]]></code>
</example>
Expand Down
2 changes: 1 addition & 1 deletion entries/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<desc>What triggered the menu to expand.</desc>
</argument>
</method>
<method name="focus" example-params='null, menu.find( ".ui-menu-item:last" )'>
<method name="focus" example-params='null, menu.find( ".ui-menu-item" ).last()'>
<desc>
Activates the given menu item and triggers the menu's <a href="#event-focus"><code>focus</code></a> event. Opens the menu item's sub-menu, if one exists.
</desc>
Expand Down
2 changes: 1 addition & 1 deletion entries/selectmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ _renderMenu: function( ul, items ) {
$.each( items, function( index, item ) {
that._renderItemData( ul, item );
});
$( ul ).find( "li:odd" ).addClass( "odd" );
$( ul ).find( "li" ).odd().addClass( "odd" );
}
]]></code>
</example>
Expand Down