Skip to content

Commit

Permalink
Merge pull request #36 from MartinZbozien/fix35
Browse files Browse the repository at this point in the history
Replace size() with length for compliance with newest jquery #35
  • Loading branch information
robertgarrigos authored Oct 13, 2024
2 parents 436d4b9 + 9cc7f8e commit f956f56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/search-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
// We can't combine all of these, since that causes
// JQuery.each() to freak ut.'
var selector = null;
if ($('table.views-table').size() > 0) {
if ($('table.views-table').length > 0) {
selector = $('table.views-table tbody tr:not(.views-table-row-select-all)');
}
else if ($('table.views-view-grid').size() > 0) {
else if ($('table.views-view-grid').length > 0) {
selector = $('table.views-view-grid td');
}
else if ($('.views-row').size() > 0) {
else if ($('.views-row').length > 0) {
selector = $('.views-row');
}
else {
Expand All @@ -38,7 +38,7 @@

// For links within the Views table, or those with a destination
// parameter, open in a new window instead.
if (href.indexOf('destination=') >= 0 || $(element).parents('table.views-table tbody').size() > 0) {
if (href.indexOf('destination=') >= 0 || $(element).parents('table.views-table tbody').length > 0) {
$(element).attr('target', '_blank');
return;
}
Expand Down

0 comments on commit f956f56

Please sign in to comment.