Thursday, 15 March 2012

jQuery - The Routes are Correct, Yet the Alert Does Not Happen? -



jQuery - The Routes are Correct, Yet the Alert Does Not Happen? -

the index.html file:

<!doctype html> <html> <head> <title></title> <script src="jquery-2.1.1.min.js"></script> <script src="script.js"></script> </head> <body> <h1>the headline tags here</h1> </body> </html>

the script.js file:

$(document).ready(function() { alert("hello!"); )};

the directory called "lightbox":

index.html jquery-2.1.1.min.js script.js

the url:

http://localhost/lightbox/

i have tried loading jquery files through way can see above , have tried check "alert" see if works. though on page load alert not happen.

what issue here?

you've written ready function wrong.

rewrite to.

$(document).ready(function() { alert("hello!"); }); //issue here. changed ')}' '})'

you should set lastly brace before parentheses

jquery

No comments:

Post a Comment