I'm having problems with $(document).ready
function. The problem is that it is not executed and there are no errors. I have tried to change $
to jQuery
, but the result is the same. I'm sure that jQuery is loaded because other JQ functions work.
Here is my code:
(function($){
alert( $(window).width() );
$(document).ready(function(){
alert(1);
});
})(jQuery);
The first alert is working fine but the second is not.