Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: $(...).stellar is not a function

I am trying to implement the stellar plugin and far as I can see, I have included all the necessary js. However, in the dev tools console I keep getting the 'Uncaught TypeError: $(...).stellar is not a function'.

This is what I have in the head tags:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UFT-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>QE | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/stuff.css"/>

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
 <script src="js/jquery.stellar.js"></script>
 <script src="js/scrip.js"></script>
 <script src="js/jquery.nicescroll.js"></script>

And this is is the scrip.js file that the error is referring to:

$(document).ready(function() {
     $(window).stellar();

});

$(document).ready(

     function() { 

     $("html").niceScroll({
         cursorcolor:"rgba(30,30,30,.5)",
         zindex:999,
         scrollspeed:100,
         mousescrollstep:50,
         cursorborder:"0px solid #fff",
     });

});

Please help me

like image 328
Seb Avatar asked May 18 '15 04:05

Seb


1 Answers

I have found out that the problem was with js/vendor/jquery.js which was I forgotten that had placed that at the bottom of the index.html file. When I removed it, the stellar function worked. Not sure why that affects stellar.js though.

like image 186
Seb Avatar answered Sep 20 '22 03:09

Seb