我正在使用turn.js,但是我得到了错误TypeError:$(.).turn不是一个函数,目前我的js是:
function loadApp() {
// Create the flipbook
$('.flipbook').turn({
// Width
width:922,
// Height
height:600,
// Elevation
elevation: 50,
// Enable gradients
gradients: true,
// Auto center this flipbook
autoCenter: true
});
}
// Load the HTML4 version if there's not CSS transform
$(document).ready(function() {
yepnope({
test : Modernizr.csstransforms,
yep: ['../../lib/turn.js'],
nope: ['../../lib/turn.html4.min.js'],
both: ['css/basic.css'],
complete: loadApp
});
});你知道我哪里会出错吗?
发布于 2014-01-24 12:59:16
很难只给出一个答案,因为这里有很多事情可能是错误的。但是,我认为问题应该是jQuery或turn.js没有正确加载。
因此,我建议您首先打开您选择的浏览器的开发工具,并检查jQuery和turn.js是否确实被加载到页面中。同时,jQuery必须在turn.js之前,这样turn.js才能正常工作。
https://stackoverflow.com/questions/21333129
复制相似问题