https://github.com/sagnik-coder24/jokes-api
Have fun with unlimited number of jokes everyday
https://github.com/sagnik-coder24/jokes-api
css html javascript jokes-api
Last synced: about 1 month ago
JSON representation
Have fun with unlimited number of jokes everyday
- Host: GitHub
- URL: https://github.com/sagnik-coder24/jokes-api
- Owner: Sagnik-Coder24
- Created: 2021-08-06T15:30:49.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T17:23:31.000Z (over 1 year ago)
- Last Synced: 2024-12-27T09:16:54.517Z (over 1 year ago)
- Topics: css, html, javascript, jokes-api
- Language: CSS
- Homepage: https://cooljokesapi.netlify.app/
- Size: 108 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Funny Jokes Website
A simple web application that fetches and displays funny dad jokes from [icanhazdadjoke.com](https://icanhazdadjoke.com/).
## Features
- Fetches random jokes using the Dad Jokes API
- Responsive design
## Technologies Used
- HTML
- CSS
- JavaScript
## Usage
Click the "Next Joke" button to fetch a random dad joke and enjoy the laughs!
## Example Code
Fetch a joke with:
```
fetch('https://icanhazdadjoke.com/', {
headers: {
'Accept': 'application/json'
}
})
.then(response => response.json())
.then(data => {
document.getElementById('joke').innerText = data.joke;
})
.catch(error => console.error('Error fetching joke:', error));
```