Skip to content

Uncaught TypeError: $frames.filter(...).sort is not a function #581

@BackuPs

Description

@BackuPs

I am testing jquery 4.0.0 beta 2 i get a error ( Uncaught TypeError: $frames.filter(...).sort is not a function) because the .sort() is removed from jquery. The slider stops working.

Any idea how to fix this?

`
function frameAppend ($frames, $shaft, type) {
if (!frameAppend[type]) {

  var thumbsFLAG = type === 'nav' && o_navThumbs,
      left = 0;

  $shaft.append(
    $frames
        .filter(function () {
          var actual,
              $this = $(this),
              frameData = $this.data();
          for (var _i = 0, _l = data.length; _i < _l; _i++) {
            if (frameData.data === data[_i]) {
              actual = true;
              frameData.eq = _i;
              break;
            }
          }
          return actual || $this.remove() && false;
        })
        .sort(function (a, b) {
          return $(a).data().eq - $(b).data().eq;
        })
        .each(function () {

          if (!thumbsFLAG) return;

          var $this = $(this),
              frameData = $this.data(),
              thumbwidth = Math.round(o_thumbSide2 * frameData.data.thumbratio) || o_thumbSide;

          frameData.l = left;
          frameData.w = thumbwidth;

          $this.css({width: thumbwidth});

          left += thumbwidth + opts.thumbmargin;
        })
  );

  frameAppend[type] = true;
}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions