Comments (4)
Its a simple math....
- starting from 1 and ending at 5 with step = 1 --- you can only have 4 stars (if you need whole stars to be highlighted). But since you have mentioned 5 stars, the plugin will highlight 5/(5-1) = 1.25 stars for value = 1.
- so starting 0 and ending with 5 with step = 1 you can have 5 stars for whole stars
- starting with 1 and ending with 6 with step = 1 you can have 5 stars for whole stars
from bootstrap-star-rating.
Here are my settings:
{
min: 1,
max: 5,
step: 1,
showClear: false,
showCaption: false,
size: 'xs',
symbol: '☆'
}
I noticed that the div.rating-stars has width: 25% when hovering on the first element. Should this not be 20%? If there are 5 stars? (100/5 = 20) ...
from bootstrap-star-rating.
If I set
min: 0
it works. Don't know why, but if min is set to 1, the out.val variable starts at 2 when hovering over the stars, in star-rating.js:367
from bootstrap-star-rating.
Hi,
I just thought it would use the normal input[type=number] "logic". http://jsbin.com/xejunufusu/1/
In the example, min=1, max=5 and to me it seems that this makes sense. If you leave the input empty (no value), no stars should be highlighted (use the cancel button). Otherwise, it starts from 1 star (=1) up to 5 stars (=5).
But once I figured out it needs to be 0 - 5 it's fine, and works OK.
Thanks!
from bootstrap-star-rating.
Related Issues (20)
- problem with modal form HOT 1
- How to change to displayOnly using jquery? HOT 1
- issue with renderAjax bootstrap modal popup
- theme not being picked up from rating container options HOT 1
- defaults language unable to set HOT 1
- Is it supported for bootstrap 4.x ? HOT 1
- Correct rating base input positioning
- Enhancements to support BS 5.x (and 4.x/3.x)
- Revamp themes - set default theme to Krajee SVG
- Correct keyboard arrow keys behavior for RTL oriented inputs
- Enhance caption badge styles
- Dropping jQuery dependency. HOT 1
- Module handling seems wrong HOT 2
- problem css class ".rating-input" line 37 HOT 2
- stars are filled in mobile (RTL) HOT 1
- olor HOT 1
- Hearts not working with jquery above version 2 HOT 1
- filling one star or icon instead of all previous ones HOT 1
- Tag version 4.1.3
- nl.js references itself as <LANG> instead of as 'nl'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-star-rating.