Sign inSign up

Dynamic score setting with jQuery

Add-ons
2026-07-26 04:31 3 views • 0 downloads 1.7KB
Dynamic score setting with jQuery

Usage

DOM structure

1
<div class="score"></div>

js

1
2
3
4
5
6
7
var s = new Score({
node:string,
score:number,
width:number,
height:number,
bgColor:string,
})

Properties

ParametersDescriptionType
nodeNodes string
scoreScorenumber
width Widthnumber
height Heightnumber
bgColorBackground colorstring
trueDefault display text valueBoolean

Methods

-- s.setScore(num) Dynamically sets the score.

-- s.disScore(boolean) Dynamically sets whether to display the text.

-- s.setTextColor(string) Dynamically sets the text color.

-- s.getScore() Dynamically gets the score (returns a number).