This project generates random numbers on mouse hover over a label, with a transition effect to showcase the number.
You can view a live demo of the project here.
- Added Fun Fact Feature: Implemented the
getFunFact
function to fetch and display a fun fact about a given number from Numbers API. The fact is shown infunFactLbl
, and if the number is not found, a default message is shown. - Error Handling Improvement: Enhanced error handling within the
getFunFact
function to display a user-friendly message when the fetch operation encounters an error. - Dynamic Content Update: Updated the
funFactLbl
to dynamically display fetched content, ensuring it only appears when valid data is retrieved.
- Generates a random 4-digit number on mouse hover.
- Transition effects on number change.
- Copy to clipboard functionality .
- New: Dark Mode
There's no specific installation required to run this project. Simply clone the repository or download the files.
git clone https://github.com/abdelhakim-sahifa/random-number.git
- Open
index.html
in your browser. - Hover over the number label to see it change randomly.
- The random number will be automatically copied to your clipboard
⚠️ Note: Some browsers may require user permission before allowing the copy operation.
-
Replace
[here](https://abdelhakim-sahifa.github.io/random-number/)
with the actual link to your live demo. -
Adjust the sections or add more details as per your project's requirements.
Feel free to customize it further based on additional features or specific details you want to highlight about your project!
This project is licensed under the MIT License - see the LICENSE file for details.
Created by @Abdelhakim-Sahifa