Skip to content

jQuery 3.4.0 .data() bug #345

Open
Open
@14coruma

Description

Current Behavior

In jquery.sidr.js, found from https://www.berriart.com/sidr/, throws an error with the latest pach to jQuery (3.4.0). The issue is with the code below:

    $sideMenu
      .addClass('sidr')
      .addClass(settings.side)
      .data({
        speed          : settings.speed,
        side           : settings.side,
        body           : settings.body,
        displace      : settings.displace,
        onOpen         : settings.onOpen,
        onClose        : settings.onClose
      });

Possible Solution

Splitting up the .data calls should do the trick:

    $sideMenu
      .addClass('sidr')
      .addClass(settings.side)
      .data('speed', settings.speed)
      .data('side', settings.side)
      .data('body', settings.body)
      .data('displace', settings.displace)
      .data('onOpen', settings.onOpen)
      .data('onClose', settings.onClose);

However, the version you have released on https://www.berriart.com/sidr/ is slightly older than master in this repo. Perhaps this issue can be fixed simply by releasing your latest version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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