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

Bug with JQuery 3.0.0 #78

Closed
blevesque opened this issue Jul 4, 2016 · 10 comments
Closed

Bug with JQuery 3.0.0 #78

blevesque opened this issue Jul 4, 2016 · 10 comments

Comments

@blevesque
Copy link

Hi,
I want to inform you that your lib doesn't work with JQuery 3.0.0 :-) We have to work with JQuery 2.2.4

@UnderlineWords
Copy link

UnderlineWords commented Jul 5, 2016

+1... Will there be an update for JQuery 3.0?
Thanks

@rvera
Copy link
Owner

rvera commented Jul 5, 2016

Ouch, do you know what changed in JQuery 3? What error are you getting?

@UnderlineWords
Copy link

UnderlineWords commented Jul 5, 2016

It doesn't give me any error message on the browser. But it doesn't work.

It maybe useful for jQuery changes
https://jquery.com/upgrade-guide/3.0/

@UnderlineWords
Copy link

UnderlineWords commented Jul 6, 2016

Hmm, it works technically when i submit the form but select style doesn't change. So i can't see the my selected items when i click on images.

@rvera
Copy link
Owner

rvera commented Jul 6, 2016

Interesting, maybe a method got deprecated. I'll take a look later in the week, thanks a lot for the heads up.

@rdennis
Copy link
Contributor

rdennis commented Jul 15, 2016

The issue seems to be with both_array_are_equal. jQuery::not is always returning true. It seems you just need to replace it with a quick array comparison.

@gotshoo
Copy link

gotshoo commented Aug 26, 2016

I replaced

both_array_are_equal = function(a, b) { return jQuery(a).not(b).length === 0 && jQuery(b).not(a).length === 0; };
with

both_array_are_equal = function(a, b) { var difference = []; $.grep(a, function (el) { if ($.inArray(el, b) == -1) difference.push(el); }); if (difference.length === 0) { var $i = 0; while ($i < a.length) { if (a[$i] !== b[$i]) { return false; } $i++; } return true; } else { return false; } };

to get this to work with Jquery 3.0

@sadgamer
Copy link

hi your code is not working gotshoo

@rdennis
Copy link
Contributor

rdennis commented Sep 16, 2016

I have a pull request #81 to add jQuery 3 support. Until the request is merged you can use my branch.

@rvera
Copy link
Owner

rvera commented Sep 25, 2016

Excellent work! Merged 🐈

@rvera rvera closed this as completed Sep 25, 2016
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

6 participants