sEnte Posted September 21, 2014 Report Share Posted September 21, 2014 (edited) Porque é que me está a dar erro na primeira linha quando a única coisa que tenho é isto... $(document).ready(function() { alert('1'); }); Está a dar este erro ReferenceError: $ is not defined Edited September 21, 2014 by sEnte "If It Ain't Broke, Break it and build something Cooler!" Unknown Link to comment Share on other sites More sharing options...
Rechousa Posted September 21, 2014 Report Share Posted September 21, 2014 Viva, Possivelmente não estás a referenciar corretamente a libraria jQuery. Não te terás esquecido de a incluir? Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa Link to comment Share on other sites More sharing options...
sEnte Posted September 22, 2014 Author Report Share Posted September 22, 2014 (edited) Este é o meu index <!DOCTYPE html> <html> <head> <title></title> <link rel='stylesheet' type='text/css' href='css/style.css'> </head> <body> <script type='text/javascript' scr='http://code.jquery.com/jquery-1.11.1.min.js'></script> <script type='text/javascript' src='js/index.js'></script> </body> </html> já reparei loool tenho SCR em vez de SRC :S Edited September 22, 2014 by sEnte "If It Ain't Broke, Break it and build something Cooler!" Unknown Link to comment Share on other sites More sharing options...
Solution Rechousa Posted September 22, 2014 Solution Report Share Posted September 22, 2014 Pois... Repara na 1a linha do script. Estás a colocar scr e não src 😉 Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa Link to comment Share on other sites More sharing options...
sEnte Posted September 22, 2014 Author Report Share Posted September 22, 2014 O sublime não marcou como erro e as vezes uma pessoa vê o que quer ver e não o que lá está... "If It Ain't Broke, Break it and build something Cooler!" Unknown Link to comment Share on other sites More sharing options...
KTachyon Posted September 22, 2014 Report Share Posted September 22, 2014 O sublime não tem que marcar. Podes colocar atributos no HTML com qualquer nome, logo nem faria sentido que o sublime to marcasse como erro. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now