0

$ Not defined? :/

<button>click</button> <script>alert("commet") $("button").on("click", function() { alert("comment" ) }); When i run the above code an error message appears and it says that $ is not defined

27th Jun 2017, 2:54 PM
sulltan Mehmood
sulltan Mehmood - avatar
2 Respuestas
+ 4
u dont have jquery lol add this before your script tag <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
27th Jun 2017, 2:57 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
It worked thanks c:
27th Jun 2017, 3:45 PM
sulltan Mehmood
sulltan Mehmood - avatar