dobtco / starrr Goto Github PK
View Code? Open in Web Editor NEW1-5 star rating, in jQuery.
Home Page: dobtco.github.com/starrr
1-5 star rating, in jQuery.
Home Page: dobtco.github.com/starrr
Hi,
Thanks for a great snippet. Is it possible to have this be read-only in order to display the reviews previously set?
Best regards
Hi, i am new to Web Development. can anyone please tell if i can add my custom star image ? if No then there is any other way to do so?
Hi there!
Thanks for your nice code.
Is there any chance you would add a keyboard support : tabulation and space bar ?
And secondly, any chance the code may work for intermediate rate levels (half star or even less) : 1.5, 2.5?
Thanks in advance for your reading.
In example:
When the star-rating is 5, and you click at the 5'th star again, the rating-value is undefined in the onchange.
$('.starrr').starrr ({ change: function(e, value){ alert('new rating is ' + value) // First time all good, second time clicking the same star result is undefined } })
how do you pull the saved rating value when a form with the rating is submitted?
i.e. how should i extract the "rating" variable?
It would be nice if this plugin can also support gradient stars. Users will be able to set start color and end color and stars will be rendered with linear gradient from start color to end color.
Please upload to cdn (like https://cdnjs.com/ for instance).
I want to show final rating based on the rating given by users. How can I do that? I do not want stars to go away on mouseover at result page.
In my code html content with
was displaying into a div in ajax success success:function(data) { $('.review_data').html(data.review_data);here star was not displaying
I'am trying to use this plugin into a simple comment system, more then one user can leave ratings of a product, so I must initialize several star ratings with its own rating value, until now I have done the following code:
$('.stars-users').starrr({
readOnly: true,
rating: $(this).data('rating')
});
Can anybody give me a help?
Thanks!
If the setter works this way in JQuery:
$("#starrr_gf_"+id).starrr('setRating', 0);
What about the getter?
Is there any way to allow half stars (3.5 stars for example)? I know FontAwesome has the icon for a half star
sharing my resolution: adding "touchstart" event to starrr.js
this.$el.on('click.starrr touchstart.starrr', 'i', (function(_this) {
Got it!
Is there a way I can change an existing star programmatically using jquery/javascript?
With font-awesome 5.8.2 (as of 2019-06-05),
the star classes should be these:
$('.starrr').starrr({
rating: 5,
emptyClass: 'far fa-star',
fullClass: 'fas fa-star',
})
In your current code, the default class for empty is: fa fa-star-o
which is not supported anymore, and so nothing will display, which is confusing.
Could you add a version number to each files
Hello, does the plugin supports decimals values, for example to set de star at middle?
$('.starrr').starrr({
readOnly: true
})
i have problem with read only option its not working
Is there a way of making the rating input required for form submission?
Hello,
Thanks a lot for your very efficient plugin. Nevertheless, I met an issue: in my project, end-users could use this rating function several times in the same page. Ideally the value of starrr would be re-initialized each time an item is evaluated but it is not, so end-users always see the previous rating. I tried the following line $('.starrr').data('rating',0); but this does not work. Is there any way to re-initialize the value of starr ?
Thanks,
Pierre
First off,
Amazing little star rating plugin.
Thank you for creating it!
Would like to add a hover event so that if you hover above star 1,2,3,4,5 the value is send back to the browser so you could do an alert. Just like the regular click star -> alert. But then on hover.
Is this hard to add ? Im not a jquery coder myself but will try to digg your code a bit more to see where I could come up with.
I suggest removing the font-size 16px on the .starrr i element so you can use fa-2x to have bigger icons also.
When i use this:
$('.starrr').starrr({ rating: $(this).attr('data-rating'),
It does not set the rating...
We are migrating to Bootstrap 4.1, For which we need to change Glyph icons with new Fontawesome or any other alternate. So, How can I do that? Please tell me it is very important to me.
I know there is function called getRating but how do i call this function in jquery.
please help.
Mouse over effect does not work...
Can you please make it work in IE7?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.