Skip to content

Generate a random 4-digit number and display a fact about it on hover, with smooth transition effects, using HTML, CSS, and JavaScript

License

Notifications You must be signed in to change notification settings

abdelhakim-sahifa/random-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the random number!

This project generates random numbers on mouse hover over a label, with a transition effect to showcase the number.

Table of Contents

Demo

You can view a live demo of the project here.

Updates in Code (08-07-2024)

  • 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 in funFactLbl, 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.

Features

  • Generates a random 4-digit number on mouse hover.
  • Transition effects on number change.
  • Copy to clipboard functionality .
  • New: Dark Mode

Installation

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

Usage

  1. Open index.html in your browser.
  2. Hover over the number label to see it change randomly.
  3. The random number will be automatically copied to your clipboard

⚠️ Note: Some browsers may require user permission before allowing the copy operation.

Notes:

  • 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!

License

This project is licensed under the MIT License - see the LICENSE file for details.


Created by @Abdelhakim-Sahifa

About

Generate a random 4-digit number and display a fact about it on hover, with smooth transition effects, using HTML, CSS, and JavaScript

Topics

Resources

License

Stars

Watchers

Forks