diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index 6ecde95..f97c498 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -705,7 +705,7 @@ Drupal.AjaxCommands.prototype = {
     // :even and :odd are reversed because jQuery counts from 0 and
     // we count from 1, so we're out of sync.
     // Match immediate children of the parent element to allow nesting.
-    $(response.selector).find('> tbody > tr:visible, > tr:visible')
+    $(response.selector).find('> tbody > tr, > tr').filter(':visible')
       .removeClass('odd even')
       .filter(':even').addClass('odd').end()
       .filter(':odd').addClass('even');
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index ae2dec0..0bf637c 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -925,7 +925,7 @@ Drupal.tableDrag.prototype.restripeTable = function () {
   // :even and :odd are reversed because jQuery counts from 0 and
   // we count from 1, so we're out of sync.
   // Match immediate children of the parent element to allow nesting.
-  $(this.table).find('> tbody > tr.draggable:visible, > tr.draggable:visible')
+  $(this.table).find('> tbody > tr.draggable, > tr.draggable').filter(':visible')
     .removeClass('odd even')
     .filter(':odd').addClass('even').end()
     .filter(':even').addClass('odd');
diff --git a/core/misc/tableresponsive.js b/core/misc/tableresponsive.js
index 4f45dee..df72f39 100644
--- a/core/misc/tableresponsive.js
+++ b/core/misc/tableresponsive.js
@@ -63,7 +63,7 @@ $.extend(TableResponsive, {
 $.extend(TableResponsive.prototype, {
   eventhandlerEvaluateColumnVisibility: function (e) {
     var pegged = parseInt(this.$link.data('pegged'), 10);
-    var hiddenLength = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden').length;
+    var hiddenLength = this.$headers.filter('.priority-medium, .priority-low').filter(':hidden').length;
     // If the table has hidden columns, associate an action link with the table
     // to show the columns.
     if (hiddenLength > 0) {
@@ -81,7 +81,7 @@ $.extend(TableResponsive.prototype, {
   eventhandlerToggleColumns: function (e) {
     e.preventDefault();
     var self = this;
-    var $hiddenHeaders = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden');
+    var $hiddenHeaders = this.$headers.filter('.priority-medium, .priority-low').filter(':hidden');
     this.$revealedCells = this.$revealedCells || $();
     // Reveal hidden columns.
     if ($hiddenHeaders.length > 0) {
diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index da3a722..edea83c 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -42,7 +42,7 @@ Drupal.tableSelect = function () {
   });
 
   // For each of the checkboxes within the table that are not disabled.
-  checkboxes = $table.find('td input[type="checkbox"]:enabled').on('click', function (e) {
+  checkboxes = $table.find('td input[type="checkbox"]').filter(':enabled').on('click', function (e) {
     // Either add or remove the selected class based on the state of the check all checkbox.
     $(this).closest('tr').toggleClass('selected', this.checked);
 
diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js
index d45bcac..11f6753 100644
--- a/core/misc/vertical-tabs.js
+++ b/core/misc/vertical-tabs.js
@@ -22,7 +22,7 @@ Drupal.behaviors.verticalTabs = {
 
     $(context).find('[data-vertical-tabs-panes]').once('vertical-tabs', function () {
       var $this = $(this).addClass('vertical-tabs-panes');
-      var focusID = $this.find(':hidden.vertical-tabs-active-tab').val();
+      var focusID = $this.find('.vertical-tabs-active-tab').filter(':hidden').val();
       var tab_focus;
 
       // Check if there are some details that can be converted to vertical-tabs
@@ -127,7 +127,7 @@ Drupal.verticalTab.prototype = {
         })
         .end()
       .show()
-      .siblings(':hidden.vertical-tabs-active-tab')
+      .siblings('.vertical-tabs-active-tab').filter(':hidden')
         .val(this.details.attr('id'));
     this.item.addClass('selected');
     // Mark the active tab for screen readers.
diff --git a/core/modules/block/js/block.admin.js b/core/modules/block/js/block.admin.js
index 5c657d4..cdffe7af 100644
--- a/core/modules/block/js/block.admin.js
+++ b/core/modules/block/js/block.admin.js
@@ -20,7 +20,7 @@ Drupal.behaviors.blockFilterByText = {
      */
     function hideCategoryDetails(index, element) {
       var $details = $(element);
-      $details.toggle($details.find('li:visible').length > 0);
+      $details.toggle($details.find('li').filter(':visible').length > 0);
     }
 
     /**
diff --git a/core/modules/ckeditor/js/ckeditor.drupalimage.admin.js b/core/modules/ckeditor/js/ckeditor.drupalimage.admin.js
index 91ead76..df64cbd 100644
--- a/core/modules/ckeditor/js/ckeditor.drupalimage.admin.js
+++ b/core/modules/ckeditor/js/ckeditor.drupalimage.admin.js
@@ -13,7 +13,7 @@ Drupal.behaviors.ckeditorDrupalImageSettingsSummary = {
       var $maxFileSize = $(root + '[max_size]"]');
       var $maxWidth = $(root + '[max_dimensions][width]"]');
       var $maxHeight = $(root + '[max_dimensions][height]"]');
-      var $scheme = $(root + '[scheme]"]:checked');
+      var $scheme = $(root + '[scheme]"]').filter(':checked');
 
       var maxFileSize = $maxFileSize.val() ? $maxFileSize.val() : $maxFileSize.attr('placeholder');
       var maxDimensions = ($maxWidth.val() && $maxHeight.val()) ? '(' + $maxWidth.val() + 'x' + $maxHeight.val() + ')' : '';
diff --git a/core/modules/comment/comment-entity-form.js b/core/modules/comment/comment-entity-form.js
index e068ef5..d7df84e 100644
--- a/core/modules/comment/comment-entity-form.js
+++ b/core/modules/comment/comment-entity-form.js
@@ -11,7 +11,7 @@ Drupal.behaviors.commentFieldsetSummaries = {
   attach: function (context) {
     var $context = $(context);
     $context.find('fieldset.comment-entity-settings-form').drupalSetSummary(function (context) {
-      return Drupal.checkPlain($(context).find('.form-item-comment input:checked').next('label').text());
+      return Drupal.checkPlain($(context).find('.form-item-comment input').filter(':checked').next('label').text());
     });
   }
 };
diff --git a/core/modules/menu/menu.admin.js b/core/modules/menu/menu.admin.js
index 8512971..f7d90b6 100644
--- a/core/modules/menu/menu.admin.js
+++ b/core/modules/menu/menu.admin.js
@@ -23,7 +23,7 @@ Drupal.menuUpdateParentList = function () {
   var $menu = $('#edit-menu');
   var values = [];
 
-  $menu.find('input:checked').each(function () {
+  $menu.find('input').filter(':checked').each(function () {
     // Get the names of all checked menus.
     values.push(Drupal.checkPlain($.trim($(this).val())));
   });
diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js
index f6a545b..5110f3b 100644
--- a/core/modules/node/content_types.js
+++ b/core/modules/node/content_types.js
@@ -18,7 +18,7 @@ Drupal.behaviors.contentTypes = {
     });
     $context.find('#edit-workflow').drupalSetSummary(function(context) {
       var vals = [];
-      $(context).find("input[name^='settings[node][options']:checked").parent().each(function() {
+      $(context).find("input[name^='settings[node][options']").filter(':checked').parent().each(function() {
         vals.push(Drupal.checkPlain($(this).text()));
       });
       if (!$(context).find('#edit-settings-node-options-status').is(':checked')) {
@@ -29,9 +29,9 @@ Drupal.behaviors.contentTypes = {
     $('#edit-language', context).drupalSetSummary(function(context) {
       var vals = [];
 
-      vals.push($(".form-item-language-configuration-langcode select option:selected", context).text());
+      vals.push($(".form-item-language-configuration-langcode select option", context).filter(':selected').text());
 
-      $('input:checked', context).next('label').each(function() {
+      $('input', context).filter(':checked').next('label').each(function() {
         vals.push(Drupal.checkPlain($(this).text()));
       });
 
@@ -40,7 +40,7 @@ Drupal.behaviors.contentTypes = {
     $context.find('#edit-display').drupalSetSummary(function(context) {
       var vals = [];
       var $context = $(context);
-      $context.find('input:checked').next('label').each(function() {
+      $context.find('input').filter(':checked').next('label').each(function() {
         vals.push(Drupal.checkPlain($(this).text()));
       });
       if (!$context.find('#edit-settings-node-submitted').is(':checked')) {
diff --git a/core/modules/node/node.js b/core/modules/node/node.js
index f0b5a38..2b052ed 100644
--- a/core/modules/node/node.js
+++ b/core/modules/node/node.js
@@ -39,7 +39,7 @@ Drupal.behaviors.nodeDetailsSummaries = {
       var vals = [];
 
       if ($context.find('input').is(':checked')) {
-        $context.find('input:checked').parent().each(function () {
+        $context.find('input').filter(':checked').parent().each(function () {
           vals.push(Drupal.checkPlain($.trim($(this).text())));
         });
         return vals.join(', ');
diff --git a/core/modules/system/system.modules.js b/core/modules/system/system.modules.js
index 4d97652..855db11 100644
--- a/core/modules/system/system.modules.js
+++ b/core/modules/system/system.modules.js
@@ -20,7 +20,7 @@ Drupal.behaviors.tableFilterByText = {
 
     function hidePackageDetails(index, element) {
       var $details = $(element);
-      var $visibleRows = $details.find('table:not(.sticky-header)').find('tbody tr:visible');
+      var $visibleRows = $details.find('table:not(.sticky-header)').find('tbody tr').filter(':visible');
       $details.toggle($visibleRows.length > 0);
     }
 
diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js
index 0f620bf..59a01f2 100644
--- a/core/modules/views_ui/js/views-admin.js
+++ b/core/modules/views_ui/js/views-admin.js
@@ -690,13 +690,13 @@ $.extend(Drupal.viewsUi.RearrangeFilterHandler.prototype, {
       // Within the row, the operator labels are displayed inside the first table
       // cell (next to the filter name).
       var $draggableRow = $(this.draggableRows[i]);
-      var $firstCell = $draggableRow.find('td:first');
+      var $firstCell = $draggableRow.find('td').filter(':first');
       if ($firstCell.length) {
         // The value of the operator label ("And" or "Or") is taken from the
         // first operator dropdown we encounter, going backwards from the current
         // row. This dropdown is the one associated with the current row's filter
         // group.
-        var operatorValue = $draggableRow.prevAll('.views-group-title').find('option:selected').html();
+        var operatorValue = $draggableRow.prevAll('.views-group-title').find('option').filter(':selected').html();
         var operatorLabel = '<span class="views-operator-label">' + operatorValue + '</span>';
         // If the next visible row after this one is a draggable filter row,
         // display the operator label next to the current row. (Checking for
