set InitialRating for multiple select
See original GitHub issueI have multiple select box which comes from database. I added “data-current-rating” to select option. But, can’t set initial rating using this option.
<select class="stars" data-current-rating="3.5">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5"></option>
</select>
<select class="stars" data-current-rating="4.4">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5"></option>
</select>
$('.stars').barrating('show', {
theme: 'fontawesome-stars-o',
emptyValue: 0,
readonly: true,
initialRating: $(this).data('current-rating')
});
Of course, I can set initialRating value from option selected
, but due to case, I will not able to display fractional star.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
bar rating - wanting default selection to be no selection
In this jquery bar rating library, we can set no value selected by default on bar. <script> $('#rating').barrating('show', ...
Read more >What is the best way to set two rating value in a web based ...
I'm working on a web based application, so it will be used on desktop and mobile devices. The problem is, that I'm looking...
Read more >Select Multiple select Example - Mobiscroll
Select - Setting values Values can change in a couple different ways: though defaults, interacting with the UI or programmatically. The select ......
Read more >Select ranges in Final Cut Pro - Apple Support
In the timeline, you can also select a range that spans multiple clips. You can trim range selections, mark them with ratings and...
Read more >Create Multi select Checkboxes in Power Apps for SharePoint ...
Video covers the following: ✓ How to create Multi Select Checkboxes in ... in Power Apps using Radio control 08:33 - Set Required...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try this. (as I mentioned at https://github.com/antennaio/jquery-bar-rating/issues/99#issuecomment-346353975)
@mdefrancq Try this; works for me.