# Code Examples

1. ## A brief history of JavaScript

2. ## JavaScript Syntax

3. ## The Document Object Model

   - Test: `alert` title attribute

4. ## A JavaScript image gallery

   - Image Gallery 1: no JavaScript
   - Image Gallery 2: swapping the pictures
   - Image Gallery 3: swapping pictures and text
   - Image Gallery 4: styled

5. ## Best Practices

   - Example: unobtrusive popup window

6. ## Image Gallery Revisited

   - Image Gallery 1
   - Image Gallery 2
   - Image Gallery 3

7. ## Creating markup on the fly

   - Test: `document.write` inline
   - Test: `document.write` external
   - Test: `alert innerHTML`
   - Test: updating `innerHTML`
   - Test: `alert` node info
   - Test: `createElement`
   - Test: `createTextNode`
   - Test: `appendChild`
   - Test: documentFragments
   - Test: documentFragments

8. ## Enhancing content

   - Display abbreviations
   - Display citations
   - Display access keys

9. ## CSS-DOM

   - Example: `alert` changed style info
   - Itinerary: striped table
   - Story: styling first paragraphs

10. ## Animated Slideshow

    - Test: positioning and moving
    - Message: moving 2 elements
    - Slideshow: simple movement
    - Slideshow: smooth movement

11. ## Putting it all together

    - Home page
    - About
    - Photos
    - Live
    - Contact

12. ## The Future of DOM Scripting