javascript - jQuery is not defined, $ is not defined and Cannot read property 'fn' -


i making web application university project. music, until upload music easily, when going reproduce have several problems, have been looking , have not been able solve yet. when inspect page jquery error not defined, , moment song play it, $ not defined error. when load page @ point , let me play songs, , can go , play next 1 normally. whenever start section , try play them @ beginning never works. , necessary reload page make work normally.

this head of html:

<head>    <script src="http://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>    <script type="text/javascript" src="/js/jquery.jplayer.min.js"></script>      <script type="text/javascript">      $(document).ready(function() {          $("#jquery_jplayer_1").jplayer({            ready: function () {              $(this).jplayer("setmedia", {                mp3: "<%=@article.mp3.url%>"              });            },            swfpath: "/js",            wmode: "window",            supplied: "mp3",            usestateclassskin: true,            autoblur: false,            smoothplaybar: true,            keyenabled: true,            remainingduration: true,            toggleduration: true          });        });      </script>  </head>

for moment have <%=render "reload"%> in first line of html. because before had load page every time went review song. not have it. still have problem mentioned above. _reload:

<script type="text/javascript">   $(document).ready(function() {           location.reload();   });   </script>

your plugin page shows you're missing little information in post. link css file, ex:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/skin/pink.flag/css/jplayer.pink.flag.min.css"> 

here's codepen of plugin working intended. https://codepen.io/anon/pen/eegbxg

it uses referenced jquery version 1.11.1 , plugins' cdn links style , js, can find here: https://cdnjs.com/libraries/jplayer

i used same markup , commented out jplayer function , works well.

i added example markup in body referenced plugin page here also: http://jplayer.org/latest/quick-start-guide/step-6-audio/

hope helps!


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -