javascript - Why my Jquery code doesne't work. Am i properly connected to Html? -


please know noob question stuck on several days.thanks in advance. jquery when open js cosole shows me error $ not definded. why jquery code doesne't work. connected html?

$(document).ready(function() {     $('#container').mouseenter(function() {         $(this).animate({             height: '+=10px'         });     });     $('#container').mouseleave(function() {         $(this).animate({             height: '-=10px'         });      });     $('#container').click(function() {         $(this).toggle(1000);     });   });
<!doctype html>  <html>  <head>  <title>project</title>      <link type="text/css" rel="stylesheet" href="style.css"/>    <script src="dev.js"></script>  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>          </head>  <body>      <div id = "container">  </div>      </body>  </html>

since script file uses jquery, ti should added after jquery

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="dev.js"></script> 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -