iberezansky / flip-book-jquery

3D FlipBook allows to browse images, PDFs or HTMLs as a flipping book. It helps to attract user attention and make more impression on him.
http://3dflipbook.net/
GNU General Public License v2.0
227 stars 88 forks source link

It Cannot read property 'bind' of undefined #15

Closed edgaru closed 4 years ago

edgaru commented 4 years ago

It worked well with the demo version, I bought it and now it doesn't work

I want to integrate it with Django:

$('#container').FlipBook({
                pdf: "{{ object.archivo.url }}",
                template: {
                    html: '{% static "templates/default-book-view.html" %}',
                    styles: [
                        '{% static "css/short-white-book-view.css" %}'
                    ],
                    links: [
                        {
                            rel: 'stylesheet',
                            href: '{% static "css/font-awesome.min.css" %}'
                        }
                    ],
                    script: '{% static "js/default-book-view.js" %}',
                    sounds: {
                        startFlip: '{% static "sounds/start-flip.mp3" %}',
                        endFlip: '{% static "sounds/end-flip.mp3" %}'
                    }
                }
            });
TypeError: Cannot read property 'bind' of undefined
    at new ClbBookPropsBuilder (3dflipbook.min.js:1)
    at BookView.onLoad (3dflipbook.min.js:1)
    at 3dflipbook.min.js:1
(anonymous) @ 3dflipbook.min.js:1
Promise.catch (async)
View @ 3dflipbook.min.js:1
BookView @ 3dflipbook.min.js:1
_libs.$.fn.FlipBook @ 3dflipbook.min.js:1
(anonymous) @ (index):226
j @ jquery.min.js:2
k @ jquery.min.js:2
setTimeout (async)
(anonymous) @ jquery.min.js:2
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
fire @ jquery.min.js:2
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
R @ jquery.min.js:3
edgaru commented 4 years ago

Solved, I was passing an empty string to the pdf attribute.