I made a small example HTML page to get JQuery's getJSON method working. It looks like below (sorry for the sloppiness, this was just a proof of concept to then later add into a larger project):
<script type="text/javascript">
function test() {
$.getJSON("http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=e999b3a5d47d013b780e8ac255c86266&user_id=24579658@N03&format=json&jsoncallback=?",
function(data){
$.each(data.photos.photo, function(i,photo){
$("<img/>").attr("src", "http://farm5.static.flickr.com/" + photo.server + "/" + photo.id + "_" + photo.secret + ".jpg").appendTo("#images2");
//alert();
if ( i == 6 ) return false;
});
});
}
I would then call that method when something was clicked using
<script type="text/javascript">
$(function() {
$("#yo").click(test);
});
</script>
This worked fine in a project where the only JS I included was JQuery and these were the only functions. However, once I added it to my other project, it through errors. The other project has some mootools libraries included which I thought might've been doing it. However, even after completely removing the mootools stuff and just using this jquery stuff, I still get the error below:
ReferenceError: $ is not defined
I do have other javaScripts included such as a google one and some other ones I've made, but they don't use JQuery or Mootools. Can anyone explain why I'd be getting this error?