Wow, this is a question question for one answer :)
jQuery, jQuery, jQuery, ?
, $ jQuery . jQuery:
window.jQuery = window.$ = jQuery;
window - . , , , window.$ $ .
() - , " " DOM ( ?).
document , DOM, node DOM. , document.domain .. - <html>.
.ready - , , DOM . , DOM , DOM , ?
, DOM , jQuery. , . ready , , DOM .
, , script ?
jQuery , , ready. :
ready: function( fn ) {
jQuery.bindReady();
if ( jQuery.isReady ) {
fn.call( document, jQuery );
} else if ( readyList ) {
readyList.push( fn );
}
return this;
},
, body, .
$({
an: 'object',
that: 'has',
nothing: 'to',
'do': 'with',
ready: 'event'
}).ready(function() { .. });
.
(function(){});
.
, , script. , ?
, , , , DOM .
script ?
, script. , DOM. . jQuery. - DOM . JavaScript, , , , , ready(..). , "", , DOM .
<script>
function hello() { alert("hello"); }
hello();
</script>
JavaScript, ?
. JavaScript , . , - , , , , MVC, .
.
, - . .
<script>
alert("Hello"), alert("World")
</script>
, .
, script , ? ?
JavaScript . , . script, . .