Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery 3.4.0 .data() bug #345

Open
14coruma opened this issue Apr 18, 2019 · 0 comments
Open

jQuery 3.4.0 .data() bug #345

14coruma opened this issue Apr 18, 2019 · 0 comments

Comments

@14coruma
Copy link

14coruma commented Apr 18, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant