Closed jamesaslett1985 closed 7 years ago
You should include JS error code.
In my case, the .indexOf() function returned undefined.
I worked around this issue by downgrading from jQuery 3.1.0 to 2.1.0.
Here is a codepen replicating the error: http://codepen.io/baph0mt/pen/dpJWEg
And the resulting console error output.
pen.js:580
Uncaught TypeError: Cannot read property 'indexOf' of undefined(anonymous function)
@ pen.js:580(anonymous function)
@ pen.js:584(anonymous function)
@ pen.js:31(anonymous function)
@ pen.js:33
I know this is old but I solved this by using https://github.com/stephband/jquery.event.move.
And then:
$(window).on("load", function(){
$("#container1").twentytwenty();
});
Thanks Jhonny! It is now working for me.
I will only add that in case you're using multiple instances your code should be:
$(window).on("load", function(){ $(".twentytwenty-container").twentytwenty(); });
Bye!
The newest version available supports jquery3 primarily by updating jquery.event.move
Hi,
I have just upgraded from JQuery 1.11.1 to 3.1.0 and it appears to have broken TwentyTwenty. Should it work with 3.1.0?
Many thanks