Giter VIP home page Giter VIP logo

fullcircleprogress.js's Introduction

FullCircleProgress Plugin requires jQuery library

Installation

Set up by importing fcp.js or fcp.min.js to your page

<script src="path/fcp.min.js"></script>

Initialization

Initialize by fullCircleProgress(parameters). Example:

$('myDiv').fullCircleProgress({
    side: 100,
    levels: 5,
    level: 3,
    alternativeColor: '#ff4586'
})

Params

Required:

  • side: the diameter of the circle in pixels
  • levels: the total number of division in the circle. (Must be > 1)
  • level: the current level.

Optional:

  • colors: array contaning colors of levels. levels[i] will be filled by colors[i]
  • alternativeColor: this color is used when colors[i] doesn't exist

if you initialized colors array but not enough to fill all levels and you didn't initialize an alternativeColor then colors[0] will take the place in the levels without color. if neither colors nor alternativeColor are initialized then the levels will be filled in black

  • achievedStyle: object of css style as you do with jQuery .css(). This style will be affected to achieved levels ( those <= level). By default:
{"opacity": "1"}
  • leftStyle: same as achievedStyle but for levels > level. By default:
{"opacity": "0.3"}
  • backgroundImage: path to image. This image will appear in background (Must be a square)
  • onClick: function executed on click on any level it gives the level clicked. Example:
function(level){alert(level)}
  • onHover: array of two functions, to be executed when the mouse pointer enters and leaves the level. Example:
onHover: [
    function(level){
        alert('entred in level '+level)
    },function(level){
        alert('left level '+level)
    }
]
  • hoverStyle: css style object (same as achievedStyle & leftStyle), affected to level on mouse enter or leave.By default (only if onClick or onHover are initialized):
{"opacity": "0.8"}
  • linked: boolean. If set to true hoverStyle will affect all levels <= hovered level, else it will affect only hovered level. By default: true

fullcircleprogress.js's People

Stargazers

Yassin Mokni avatar

Watchers

James Cloos avatar Burawi Ben Ammar avatar

fullcircleprogress.js's Issues

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.