Can someone please give me an example of the onRate()
callback function (http://semantic-ui.com/modules/rating.html#/settings) for the rating widget in Semantic UI. I have tried everything :(
$('.ui.rating').rating('onRate(rating_changed())');
$('.ui.rating').rating().onRate(rating_changed());
$('.ui.rating').rating().onRate('rating_changed()');
etc ...
I don't know whether it should be used in javascript or in the div for the rating (<div class="ui rating">
. Any help would be gratefully received.
Semantic UI is not dead. There is a community that wants to keep it going. I think it would be helpful to create an RFC repo to discuss future direction of the project and the planning of the implementations of the decisions we make.
Semantic UI is similar to Bootstrap in that it uses a component design system but gives you more granular control of the components. You tend to have more modifying classes in Semantic Ui to switch up the styles and looks, and on top of that, Semantic has good support for theming.
Semantic UI is a free open source project already used in multiple large scale production environments.
Semantic UI is a front-end development framework similar to bootstrap designed for theming. It contains pre-built semantic components that helps create beautiful and responsive layouts using human-friendly HTML.
You have to use the setting API:
$('.ui.rating')
.rating('setting', 'onRate', function(value) {
// your amazing code here
});
Something like this
$('.ui.rating')
.rating({
maxRating: 5,
onRate: function (rating) {
console.log(rating)
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With