Giter Club home page Giter Club logo

daynightcycle's Introduction

Day Night Cycle

A jQuery script which modify your background based on the time

Usage

This script as been made in Javascript and jQuery. You need then to add jQuery to the page on which the script will be executed.

Here is a sample of an empty page which is ready to run the script :

<!DOCTYPE html>
<html>

  <head>
    <title>Website</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="daynightCycle/daynightCycle.js"></script>
  </head>

  <body>

  </body>

</html>

To adapt the script to your requirements, you can tweak various settings:

  • div : this is the element on your webpage on which the effect will be applied. By default, this setting targets the body tag. You can add any element, such as a .class or an #id, but the effect will apply on the first element concerned.

  • mode : The script will support various modes. Currently, the single mode available is the gradient mode, which update the background of the div with gradients which looks close to the sky at the time concerned. Other modes will be implemented later on.

Credits

Script developped by LYRO. If you want to propose a new mode, improve a feature or correct a bug, don't hesitate to make a pull request. I will review it as soon as possible.

The gradients have been taken from uiGradients.com.

This script is distributed for free and for everyone. Feel free to use it on your website!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.