twitter bootstrap - jQuery library does not load -
i new jquery, , have created simple index.html simpler script. however, jquery library not seem load in firebug console following error:
typeerror: $ not function $(document).ready(function() { below index.html:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>online calorie tracker , analyzer</title> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"> <script src="http//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="js/bootstrap.js"></script> <script src="initialize.js"></script> </head> <body> <div class="container"> <h1>calorie tracker , analyzer</h1> <div class="navbar"> <div class="navbar-inner"> <div class="container"> <ul class="nav"> <li class="active"><a href="index.html">home</a></li> <li><a href="#">track food</a></li> <li><a href="#">analyze food</a></li> </ul> </div> </div> </div> <div class="hero-unit"> <h1>a healthy begins tracking , analysis</h1> <p>10 out of 10 doctors agree. losing weight healthy. our online calorie tracker , analyzer, power in hands!</p> <button class="btn btn-danger" id="btn1">get started</button> </div> </div> <body> <html> and here jquery script:
$(document).ready(function() { alert("hello"); }); any appreciated!
<script src="http//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> should be:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> also it's recommended load javascripts before end of <body> tag, improve page loading speed.
also: end <body> tag should </body> (missing forward slash).
Comments
Post a Comment