, jQuery. ( ). , , (, , ):
$(document).ready(function() {
});
script, :
<script type="text/javascript">
$('div').css('background-color','green');
</script>
div ( <head>, ). $(function() { }); $(document).ready(function() { }); ( , , ), div, DOM ( HTML, ).
And yes, you can use it as many times as you want on your page.
More information here: Tutorials: Presenting $ (document) .ready ()
source
share