Infinite Scroll is a simple web application that fetches and displays posts dynamically as the user scrolls. The posts are retrieved from an external API, providing an endless scrolling experience similar to social media platforms.
- Infinite scrolling functionality
- Fetches posts from
https://jsonplaceholder.typicode.com/posts
- Smooth loading animation
- Debounced scrolling to optimize performance
- Clean and responsive UI
To run the project locally, follow these steps:
-
Clone the repository: git clone https://github.com/singhalaadi/infinite-scroll.git
-
Navigate to the project directory: cd infinite-scroll
-
Open index.html in your browser.
- Open index.html in any modern web browser.
- Scroll down to load more posts dynamically.
- Posts will be fetched in batches of 5 from the API.
- The loader animation appears when new posts are being loaded.
infinite-scroll/
│── index.html # Main HTML file
│── style.css # Stylesheet for the application
│── script.js # JavaScript file handling data fetching & infinite scroll
│── README.md # Project documentation
- The API request limits posts to 5 per request.
- A debounce function is implemented to optimize scroll events.
- The loader animation appears during API calls.
- This project relies on:
- JavaScript Fetch API: To fetch posts from the API.
- CSS Animations: For the loading spinner effect.
Aaditya Singhal
This project is licensed under the MIT License.