HTML and CSS Reference
In-Depth Information
Try iT
In this Try It you learn how to include advanced functionality from a JavaScript framework.
Lesson requirements
You will need the tpa_earthrise.html file from the Lesson_22 folder, as well as a text editor and
web browser.
You can download the code and resources for this lesson from the topic's web
page at www.wrox.com .
step-by-step
1.
Open your text editor.
2.
From the Lesson_22 folder, open tpa_earthrise.html .
3.
Put your cursor after the closing </style> tag and press Enter (Return).
4.
Enter the following code:
<script type=”text/javascript”>
<!--
$(document).ready(function(){
$(“#erImage”).fadeIn(8000);
});
-->
</script>
5.
Save your file.
6.
In your browser, open tpa_earthrise.html to make sure that the earth fades in properly as
shown in Figure 22-3.
77 7
Return to your text editor and adjust the fadeIn value.
8.
Save the page and switch to your browser. Refresh the page to view the changed timing.
Search WWH ::




Custom Search