Skip to content

Big refactoring!

Compare
Choose a tag to compare
@kottenator kottenator released this 30 Oct 19:24
· 83 commits to master since this release

I've made a big code refactoring. Now the widget has own JS constructor and the instance! 👍

You can get the instance by $(el).data('circle-progress').
JSDoc will explain everything what's happening inside.

All functionality is the same but with a little bonus. Now you can update specific property and redraw the widget with all the same other options.

Like so:

$(el).circleProgress({ fill: { color: 'red' }, value: 0.5 }); // init the widget
$(el).circleProgress({ value: 0.7 }); // change the value, color will stay 'red'
                                      // auto-redraw after that