I think there is a conflict with the way WordPress uses jQuery:
Tried:
(function($) {
$(document).ready(function(){
alert('hello');
});
}(jQuery));
Tried also:
$(document).ready(function(){
alert('hello');
});
And Firebug dumps:
jQuery is not defined
[Detener en este error] }(jQuery));
And also tried:
jQuery.noConflict();
jQuery(document).ready(function($) {
alert("hello");
});
and Firebug:
jQuery is not defined
[Detener en este error] jQuery.noConflict();
And jQuery is imported
Any idea what am i missing?
It looks like jQuery is not available (neither the
$variable norjQuerywere defined). In your particular case, it’s because the library is not loaded at all. Put the next code in your<head>section before your the scripts requiring jQuery: