$(document).ready, , , DOM. , $(document).ready, - , DOM, . , /, , DOM .. $(document).ready, , , , , ..
, $(document).ready, , , ( ) , ready ( jQuery).
EDIT:
, , , . JavaScript ,
var myPageLibrary = {
homePage : {
init : function() {
$(document).ready(function() {
});
}
},
aboutPage : {
init : function() {
$(document).ready(function() {
});
}
}
}
function showSubMenu(e) {
$(e.target).next('div').show();
}
function hideSubMenu(e) {
$(e.target).next('div').hide();
}
( )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>This is my Home Page</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="path-to-myPageLibrary.js"></script>
<script type="text/javascript">
myPageLibrary.homePage.init();
</script>
</head>
<body>
</body>
</html>
jQuery script, myPageLibrary script, script, myPageLibrary.homePage.init();