photoTilt icon indicating copy to clipboard operation
photoTilt copied to clipboard

Unable to read Container

Open keiranlovett opened this issue 10 years ago • 0 comments


<div class="test"></div>

<script src="../photoTilt.js"></script>
<script>
    (function() {
        var photoTilt = new PhotoTilt({
            url:'http://farm5.staticflickr.com/4016/4251578904_f13592585c_b.jpg',
            lowResUrl: 'http://farm5.staticflickr.com/4016/4251578904_f13592585c_m.jpg',
            maxTilt: 12,
            container: '.test'  //optional, defaults to body

        });
    })();
</script>

Uncaught TypeError: Cannot read property 'width' of null - line 200.

Error when trying to assign a div to the container, tried multiple variations but still occurs.

keiranlovett avatar Mar 14 '14 09:03 keiranlovett