Hello everybody,
I’m trying to use turn.js to add a flipbook on this page. It seems like I’ve done everything properly, but it doesn’t work. There’s something I’m missing and I can’t figure out what. Here’s what I did:
In the page settings I went to custom code and inside I added:
<.script src=“https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js”><./script>
<.script src=“//cdn.jsdelivr.net/turn.js/3/turn.js”><./script>
plus a bunch of CSS inside a <.style> tag.
Then in section before I put
<.script type=“text/javascript”>
$(document).ready(function() {
$(“#flipbook”).turn({
width: 400,
height: 300,
autoCenter: true
});
});
<./script>
Then I put an embed component in the page and wrote (copied and pasted from turn.js webpage, just as a test):
<.div id=“flipbook”>
<.div class=“hard”> Turn.js <./div>
<.div class=“hard”><./div>
<.div> Page 1 <./div>
<.div> Page 2 <./div>
<.div> Page 3 <./div>
<.div> Page 4 <./div>
<.div class=“hard”><./div>
<.div class=“hard”><./div>
<./div>
When I publish I can see the text and some sort of grey container (with the wrong size), and by checking the dev console I get this:
jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2 jQuery.Deferred exception: $(…).turn is not a function TypeError: $(…).turn is not a function
at HTMLDocument. (https://designing-digital-products-for-kids.webflow.io/:78:17)
at e (https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2:30005)
at t (https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2:30307) undefined
S.Deferred.exceptionHook @ jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2
jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2 Uncaught TypeError: $(…).turn is not a function
at HTMLDocument. ((index):78)
at e (jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2)
at t (jquery-3.5.1.min.dc5e7f18c8.js?site=5f840a2fcc81a1119a328590:2)
Here’s is the read-only link to the page:
https://preview.webflow.com/preview/designing-digital-products-for-kids?utm_medium=preview_link&utm_source=dashboard&utm_content=designing-digital-products-for-kids&preview=d81498887568926ac51608fa2af6ea61&mode=preview
Can anyone help? Thanks a lot!