My problem is that I want to use that function for several pages, I just do not want to be placing the <script></script>
in all of them, it's very exhausting.
You see, I'm starting to use Alertify.js
and I want to use that function in a js
file, only that I get this in the browser:
ReferenceError: $ is not defined
this because I have the function like this:
$(document).ready(function() {
$("#butonanon").click(function(){
alertify.alert('hola mundo');
});
});
Error reference image:
I get this way in the Mozilla Firefox browser:
and my file validacionForm.js where I have the function:
[UPDATE]
RESOLVED:
The jquery library must be loaded before loading your js file: