and everything ws fine when was working with just javascrtript and html.
But now I want to put it together with php fraework and I cannnot get it to work.
It does not draw select box first of all. And does not draw contacts. Maybe if I would get the idea why it is not drawing select box, then I would undestand other things.
I commented out the code to figure out in which place things stop working.
means, I usually don't use such expessions, but as from tutorial there were sentences about catching or something like that - jquery cached version. I am not sure.
but I don't get why is that. Nothing worked, so I eneded up deleting all html and all javascript because it has to start working at some point. So I have empty files.
Just made div #contacts, included jquery and app.js which I am wrinting.
in app.js only put the code
$(function() {
// Stuff to do as soon as the DOM is ready;
$('#contacts').html('sudas');
});
and finally it started to work :D wow. IF this would not have worked then I really would not understand.
So I Ctrl + Z both html and app.js files to get back where I was.
And I see the difference.
Original document ready was like this:
(function ($) {
...
} (jQuery));
But my wokring code was as you saw
$(function() {
And this difeerence made it work. FML.
Can somebody explain what is the difference? I thoguht its the same document ready.
ANd how this could work earlier? I mean