Tuesday, 1 October 2013

jQuery $ is not defined

jQuery $ is not defined

Normally I would be able to figure this one out but this one has me trumped.
I inherited a project at work that is.. horrifying. I've cleaned it all up
and everything, except for the javascript/jquery.
I have a simple document ready click alert("test") function running, (and
it works??) in an external javascript file. If I include jQuery 1.9.0, the
alert pops up twice (which according to the console it is being called
somewhere.. so including it where I did seemed to be a duplicate).
So my question is what cases would cause jQuery to work, yet trigger the
undefined $?
And .noConflict() is NOT being called.
The code is called here:
$(document).ready(function() {
$("#contactSecondaryYes").click(function(){
alert($(this).val());
});
});

No comments:

Post a Comment