Skip to content

Commit

Permalink
Fix: Deprecated .size()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Dec 24, 2023
1 parent 84f61ea commit 5d77636
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,6 @@
*/
p.withinWrapElement = function(element)
{
return this.core().wrapElement().find(element).size() > 0;
return this.core().wrapElement().find(element).length > 0;
}
})(jQuery);
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/colorpicker/js/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var currentTab = $('ul.navigationTabs a')
.bind('click', showTab)
.filter('a[rel=' + hash + ']');
if (currentTab.size() == 0) {
if (currentTab.length == 0) {
currentTab = $('ul.navigationTabs a:first');
}
showTab.apply(currentTab.get(0));
Expand Down
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/js/jquery.validate.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Halte Dich mit unserem [Newsletter](https://n3rds.work/webmasterservice-n3rdswor
* Fix: Deprecated jQuery.parseJSON()
* Fix: Deprecated .unbind()
* Fix: Deprecated .submit()
* Fix: Deprecated .size()

= 3.5.6 =

Expand Down
2 changes: 1 addition & 1 deletion ui/colorpicker/js/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var currentTab = $('ul.navigationTabs a')
.bind('click', showTab)
.filter('a[rel=' + hash + ']');
if (currentTab.size() == 0) {
if (currentTab.length == 0) {
currentTab = $('ul.navigationTabs a:first');
}
showTab.apply(currentTab.get(0));
Expand Down
2 changes: 1 addition & 1 deletion ui/js/jquery.validate.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ui/js/mp-cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ var mp_cart = { };
if ( resp.success ) {

if (resp.data.image) {
if ($container.find('.mp_product_image_link').size() == 0) {
if ($container.find('.mp_product_image_link').length == 0) {
$('.mp_single_product_images').html(
$('<a/>').attr({
'class': 'mp_product_image_link mp_lightbox cboxElement',
Expand Down Expand Up @@ -292,7 +292,7 @@ var mp_cart = { };
$container.find( '.mp_product_tab_content_text' ).html( resp.data.description );
//}
//update content for lightbox
if ( $( '.mp_product_options_excerpt' ).size() > 0 ) {
if ( $( '.mp_product_options_excerpt' ).length > 0 ) {
$( '.mp_product_options_excerpt' ).html( resp.data.excerpt );
}

Expand Down
4 changes: 2 additions & 2 deletions ui/js/mp-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ var mp_checkout;

if ( $form.valid() ) {
var checkout_as_guest = false;
if ($form.find('#is_checkout_as_guest').size() > 0) {
if ($form.find('#is_checkout_as_guest').length > 0) {
checkout_as_guest = true;
}

Expand Down Expand Up @@ -587,7 +587,7 @@ var mp_checkout;
$( 'input[name="mp_login_email"]' ).rules( 'remove' );
$( 'input[name="mp_login_password"]' ).rules( 'remove' );
var form = $(this).closest('form');
if (form.find('#is_checkout_as_guest').size() == 0) {
if (form.find('#is_checkout_as_guest').length == 0) {
form.append($('<input id="is_checkout_as_guest"/>'));
}
//$( '.mp_checkout_section_errors' ).hide();
Expand Down

0 comments on commit 5d77636

Please sign in to comment.