如果它在我的服务器上,我下面的代码可以工作,但是在我的本地机器上查看时,它会给我以下错误:
ReferenceError: jQuery is not defined
$(document).ready(function() {
default.html (line 24)
ReferenceError: $ is not defined
$(document).ready(function() {
default.html (line 12)
ReferenceError: $ is not defined
$(document).ready(function() {
代码:
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" href="slider/site/style.css">
<script type="text/javascript" src="slider/src/unslider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var unslider = $('.container').unslider();
$('.arrow').click(function() {
var fn = this.className.split(' ')[1];
// Either do unslider.data('unslider').next() or .prev() depending on the className
unslider.data('unslider')[fn]();
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('.line1').fadeIn(7000);
$('#slide2').delay(1000).fadeIn(3200);
$('#slide3').delay(1800).fadeIn(3200);
$('.line4').delay(4000).fadeIn(3500);
});
</script>