A comprehensive interactive web application showcasing advanced DOM (Document Object Model) manipulation techniques, event handling, animations, and modern JavaScript practices.
Live-Link: https://d162005.github.io/dom/
- Overview
- Technologies Used
- Features
- Project Structure
- Getting Started
- Interactive Sections
- Installation & Usage
- Browser Support
- Learning Outcomes
- Code Quality
- File Descriptions
- Customization
- Contributing
- License
- Author
- Support
- Future Enhancements
This project is an educational platform designed to demonstrate practical DOM manipulation techniques through 17 interactive sections. Each section focuses on different JavaScript concepts and DOM APIs, providing hands-on learning experience with real-world implementations.
Key Highlights:
- ✨ Dynamic index with image preview system
- 🎮 Multiple interactive games and animations
- 🎯 Advanced event handling and DOM traversal
- 🎨 CSS animations with JavaScript control
- 🖼️ Real-time image manipulation and filters
| Technology | Purpose |
|---|---|
| HTML5 | Semantic markup and structure |
| CSS3 | Styling, animations, gradients, Grid layouts |
| JavaScript (ES6+) | DOM manipulation, event handling, game logic |
| GSAP | Advanced animations and tweening |
| Remixicon | Icon library for UI elements |
| Material Symbols | Material Design icons |
- Event listeners (click, hover, mousemove, dragstart)
- DOM traversal and manipulation
- Array methods (map, forEach, filter)
- Arrow functions and closures
- and dataTransfer API
- Canvas API for image processing
- setInterval and setTimeout
- requestAnimationFrame concepts
- Dynamic Index Navigation - Intelligent preview system with position-aware image popups
- Interactive Games - Bubble clicking game, Snake game, Color matching game
- Real-time Effects - Cursor customization, hover effects, throttled animations
- Image Processing - Professional image editor with multiple filters
- Media Integration - Video/Reel playing with interactive controls
- Drag & Drop - Interactive sorting by color
- Smooth Animations - CSS-based animations with JavaScript orchestration
DOM/
├── index.html # Main HTML file with all sections
├── script.js # Core JavaScript logic (main application)
├── style.css # Styling and animations
├── data.js # Data arrays (teams, headlines, cursors, reels, filters)
├── img/ # Image assets folder
│ ├── box1prev.png # Box preview images
│ ├── box2prev.png
│ ├── ...
│ ├── box17prev.png
│ ├── cursor_design-removebg-preview.png
│ └── [other assets]
└── README.md # This file
- Modern web browser (Chrome, Firefox, Safari, Edge)
- No build tools or dependencies required
- Basic knowledge of JavaScript and DOM concepts
-
Clone or Download the Project
git clone <repository-url> cd DOM
-
Open in Browser
# Simply open index.html in your web browser # Or use a local server (recommended)
-
Using Live Server (Recommended)
# Using Python python -m http.server 8000 # Using Node.js (http-server) npx http-server
- Description: Intelligent navigation system with dynamic index
- Features:
- Auto-generated index from data
- Smart image preview positioning
- Left-side items show preview on right
- Right-side items show preview on left
- Technologies: Map function, DOM positioning, event listeners
- Description: Generate random team data with color changes
- Features: IPL teams database with dynamic styling
- Click Event: Updates heading, motto, and background colors
- Description: Dynamically create random elements
- Features: Generate random shapes and text with rotation
- Technologies: Math.random(), DOM creation
- Description: Animated download progress indicator
- Features:
- Progress bar animation
- Percentage display
- Download time calculation
- Reset button
- Description: Animated heart animation on click
- Features:
- Image click detection
- Heart icon animation with scaling
- Rising animation with opacity
- Technologies: GSAP animations
- Description: Custom cursor selection and display
- Features:
- Multiple cursor options
- Real-time cursor replacement
- Mouse position tracking
- Custom styling per cursor
- Description: Interactive number clicking game
- Features:
- Timed gameplay (60 seconds)
- Score tracking
- Random bubble generation
- Hit target highlighting
- Description: Social media-style video reels
- Features:
- Like/Unlike functionality
- Follow/Unfollow system
- Video playback controls
- Comment and share icons
- Description: Interactive spotlight effect
- Features:
- Radial gradient spotlight following mouse
- Text scramble animation on hover
- Dynamic image reveal effect
- Description: CSS-only card animation with hover effects
- Features:
- Pure CSS transitions
- Border animations
- Image hover effects
- Description: Advanced CSS-based animations
- Features:
- Transform effects
- Keyframe animations
- Scroll-based triggers
- Description: Interactive color mixer
- Features:
- Mouse position-based color mapping
- RGB value calculation with GSAP
- Border color sync
- Description: Mouse-tracking animation
- Features:
- GSAP animations
- Real-time position mapping
- Smooth easing
- Description: Throttled particle effect on hover
- Features:
- Image particle generation
- Throttled mousemove events
- Animated particle rise effect
- Description: Classic snake game implementation
- Features:
- WASD controls
- Food collision detection
- Score tracking
- Game over detection
- Reset functionality
- Description: Color-based drag and drop game
- Features:
- Draggable colored boxes
- Color-coded drop zones
- Visual feedback on drop
- Drag state styling
- Description: Professional image filter application
- Features:
- File upload
- Real-time filter adjustments:
- Brightness, Contrast, Saturation
- Grayscale, Sepia, Blur
- Hue-rotate, Opacity, Invert
- Canvas-based rendering
- Download edited image
- Reset to original
-
Local File System
Simply open index.html in your browser Note: Some features may have restrictions with file:// protocol -
Access in Browser
http://localhost:8000
- Index Navigation: Hover over index items to preview images, click to navigate
- Games: Follow on-screen instructions for each game section
- Image Editor: Upload image → Adjust filters → Download edited version
- Cursor Changer: Click button to reveal cursor options → Select cursor
| Browser | Support | Notes |
|---|---|---|
| Chrome | ✅ Full | Recommended |
| Firefox | ✅ Full | Full support |
| Safari | ✅ Full | Supported |
| Edge | ✅ Full | Chromium-based |
| IE 11 | ❌ No | Not supported |
- ES6 JavaScript support
- CSS Grid & Flexbox
- Canvas API
- File API (for image editor)
By exploring this project, you'll learn:
✅ DOM Manipulation
- Creating, updating, and removing DOM elements
- Traversing the DOM tree
- Event delegation and handling
✅ Event Handling
- Click, hover, mousemove events
- Drag and drop API
- Custom event listeners
✅ JavaScript Concepts
- Higher-order functions (map, forEach)
- Closures and scope
- Async operations (setInterval, setTimeout)
- Array and Object methods
✅ Animation Techniques
- CSS animations and transitions
- GSAP library usage
- Canvas-based effects
- Throttling and debouncing
✅ Advanced Patterns
- Game loop implementation
- State management
- Real-time calculations
- Performance optimization
- ✅ Clean, readable code structure
- ✅ Proper variable naming conventions
- ✅ Organized function implementations
- ✅ Comprehensive data structures
- ✅ Reusable component patterns
- Semantic HTML5 structure
- 17 interactive sections (box0 to box17)
- CDN links for external libraries
- Responsive design meta tags
- Main application logic
- All event listeners and handlers
- Game implementations
- Animation orchestration
- Data-driven UI updates
- Comprehensive styling system
- CSS Grid and Flexbox layouts
- Smooth transitions and animations
- Responsive design breakpoints
- Gradient backgrounds and effects
- IPL teams database
- Motivation headlines array
- Custom cursor options
- Social media reels data
- CSS filter configurations
- Box preview images (17 total)
- Custom cursor assets
- Miscellaneous UI graphics
- Add HTML markup in
index.html - Update
boxTitlesindata.jswith new box - Add styles to
style.css - Implement logic in
script.js
Edit CSS variables or class colors in style.css:
#box1 { background-color: #your-color; }Modify arrays in data.js:
let iplTeams = [ /* your data */ ];
let headlines = [ /* your data */ ];Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is provided as an educational resource. Feel free to use, modify, and distribute for learning purposes.
Darshan Patil
- 🌐 GitHub: @D162005
- 📧 Email: darshanpatil16012005@gmail.com
- 💼 LinkedIn: Darshan Patil
For issues, questions, or suggestions:
- Report Issues: Open an Issue
- Ask Questions: Check Discussions
- Contact Author:
- Email: darshanmpatil16012005@gmail.com
- LinkedIn: Darshan Patil
Images not loading?
- Ensure image files exist in the
img/folder - Check file paths in the code
- Use a local server instead of file:// protocol
Scripts not working?
- Check browser console for JavaScript errors
- Verify external CDN libraries are loading
- Ensure JavaScript is enabled in your browser
Styling issues?
- Clear browser cache and reload
- Check CSS file is properly linked
- Test in different browsers
- Mobile responsiveness improvements
- Accessibility (A11y) features
- Progressive Web App (PWA) support
- TypeScript migration
- Unit testing integration
- Performance optimization
- Additional games and features
- Dark/Light mode toggle
Made with ❤️ for DOM Learning by Darshan Patil
Give it a ⭐ if you like this project!