前提・実現したいこと
Infinite Scrollを利用するために簡単なサンプルを下記ページを参考に作成しようとしたのですが、
設定が悪いのかis not afunctionとエラーが出てしまいます。
参考ページ
https://on-ze.com/archives/2486
発生している問題・エラーメッセージ
jQuery.Deferred exception: $(...).infinitescroll is not a function TypeError: $(...).infinitescroll is not a function at HTMLDocument.<anonymous>
該当のソースコード
html
1<head> 2<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> 3<script src="infinite-scroll.pkgd.min.js"></script> 4<script> 5$(function(){ 6 $('#content').infinitescroll({ 7 navSelector : ".navigation", 8 nextSelector : ".navigation a", 9 itemSelector : ".article" 10 }); 11}); 12</script> 13</head> 14<body> 15<div id="content"> 16 <div class="article"> 17 <p> 18 ここに「index1.html」のコンテンツが入ります。 19 </p> 20 </div> 21 <div class="navigation"> 22 <p><a href="index2.html">次のページ</a></p> 23 </div> 24</div> 25</body> 26
試したこと
エラーメッセージで検索したら、jQueryの多重読み込みと出てきたのですが、
該当箇所が見当たりませんでした。
補足
infinite scrollは下記公式サイトよりダウンロードいたしました。
https://infinite-scroll.com/
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/19 07:03
2019/06/20 03:41