This project fetches superhero data from a public API and displays it in a paginated, sortable table. Users can filter heroes by name and navigate through pages of heroes.
- Fetches superhero data from Superhero API.
- Displays heroes in a table format with sorting functionality.
- Pagination controls to navigate through pages of heroes.
- Search functionality to filter heroes by name.
Make sure you have a modern web browser and a basic understanding of HTML and JavaScript.
-
Clone the repository:
git clone https://learn.zone01kisumu.ke/git/somotto/sortable cd sortable -
Open
index.htmlin your web browser.
- Enter a name in the search box to filter heroes.
- Click on the table headers to sort by that column.
- Use the pagination buttons to navigate through pages of heroes.
index.html: The main HTML file containing the structure of the application.script.js: Contains the JavaScript functions for fetching, filtering, sorting, and paginating the heroes.style.css: Contains the styles for the table and layout.
To run the tests, ensure you have Jest installed. Then, run:
npm testIf you'd like to contribute, please fork the repository and submit a pull request.