Skip to content

Commit

Permalink
MAGETWO-87935: #13685: Replaced .size() with .length to be compatible…
Browse files Browse the repository at this point in the history
… with jQuery 3.* #13686
  • Loading branch information
Oleksii Korshenko authored Feb 20, 2018
2 parents 6f2282a + 59d3e60 commit f23aef3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ define([
$title,
$corner;

if (!$element.size()) {
if (!$element.length) {
$element = $('<div class="' +
$widget.options.tooltipClass +
'"><div class="image"></div><div class="title"></div><div class="corner"></div></div>'
Expand Down Expand Up @@ -810,7 +810,7 @@ define([
$widget._Rewind(controls);

// done if nothing selected
if (selected.size() <= 0) {
if (selected.length <= 0) {
return;
}

Expand All @@ -820,7 +820,7 @@ define([
id = $this.attr('attribute-id'),
products = $widget._CalcProducts(id);

if (selected.size() === 1 && selected.first().attr('attribute-id') === id) {
if (selected.length === 1 && selected.first().attr('attribute-id') === id) {
return;
}

Expand Down Expand Up @@ -1016,7 +1016,7 @@ define([
_EnableProductMediaLoader: function ($this) {
var $widget = this;

if ($('body.catalog-product-view').size() > 0) {
if ($('body.catalog-product-view').length > 0) {
$this.parents('.column.main').find('.photo.image')
.addClass($widget.options.classes.loader);
} else {
Expand All @@ -1035,7 +1035,7 @@ define([
_DisableProductMediaLoader: function ($this) {
var $widget = this;

if ($('body.catalog-product-view').size() > 0) {
if ($('body.catalog-product-view').length > 0) {
$this.parents('.column.main').find('.photo.image')
.removeClass($widget.options.classes.loader);
} else {
Expand Down

0 comments on commit f23aef3

Please sign in to comment.