jquery - How do I make this JavaScript work on my local machine? -
the code have below works if it's on server when viewed on local machine gives me following errors:
referenceerror: jquery not defined $(document).ready(function() { default.html (line 24) referenceerror: $ not defined $(document).ready(function() { default.html (line 12) referenceerror: $ not defined $(document).ready(function() {
code:
<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 unslider.data('unslider').next() or .prev() depending on 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>
your script tag giving browser trouble. replace "//code.jquery.com/jquery-latest.min.js"
"http://code.jquery.com/jquery-latest.min.js"
, should work.
Comments
Post a Comment