swipebox
swipebox copied to clipboard
Swipe box doesn't work with jQuery 3.2.1
Swipe box doesn't work with jQuery 3.2.1.
When you click any space on page black screen opens. Can you fix it?
I think
selector = elem.selector,
just needs to be replaced with:
selector = '.swipeboxImg',
all and the .bind()'s to be changed to .on and unbind() to .off()
Yes it works, but some time ppl may use different class names eg selector = '.swipebox',
Yes, that would be an issue. Do you know where custom class names are set?
Normally when the .swipebox is called.
For example in mine it is $('.swipebox').swipebox({options});
I did a console.log in the jQuery file, and it gets the elements, but the elem.selector does not work.
I found this on the jQuery upgrade site, https://jquery.com/upgrade-guide/3.0/#breaking-change-deprecated-context-and-selector-properties-removed
The solution of @shandhiviyarajan worked for me.
Yes that works in that one instance, but What if you have different selectors to trigger it with different options, like you want one swipebox on your page looping, and another not.
Does anybody have a working update that they would be willing to post?
Here's a patch file we've been using internally to make Swipebox work for us. I think this should work regardless of the selector, but let me know if you see any issues with it.
Actually, this PR is an even better fix I think: https://github.com/brutaldesign/swipebox/pull/298
Here's a patch file we've been using internally to make Swipebox work for us. I think this should work regardless of the selector, but let me know if you see any issues with it.
bmcclure! thanks a LOT... I tried the first suggestion, by shawnCaza, and it didn't work, I could click on the picture already, but that would only cause the referenced image to be downloaded (shown) directly, by its URL
the patch, however, works perfectly... I've never seen a patch file like this before, totally love it! :)
thanks a lot @ 02.22.2020