Last active
January 18, 2023 14:03
-
-
Save motsu0/2ebbdcd4b226dff2e29ee335e3ca919a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="review-star" data-size="20" data-val="3" data-max="5"></span> | |
<!-- | |
data-size(int)[px] 星のサイズ(>=4) 初期値16 | |
data-val(number) 評価数(星)の値(>=0) 初期値0 | |
data-max(int) 評価数(星)の最大値(>=1) 初期値5 | |
--> | |
<script src="pathto/review-star.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//通常 | |
const review_star = new reviewStar(); | |
//オプション付き | |
const options = { | |
color_base: 'blue', | |
color_star: 'red' | |
}; | |
const review_star = new reviewStar('CLASS_NAME',options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment