Comments (1)
Here is my solution
first, replaced the fontawesome-stars-o.css as the following:
.br-theme-fontawesome-stars-o .br-widget {
height: 28px;
white-space: nowrap;
}
.br-theme-fontawesome-stars-o .br-widget a {
font: normal normal normal 17px/1 'Font Awesome 5 Free';
font-weight: 500;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
text-decoration: none;
color: #FFB600;
margin-right: 4px;
}
.br-theme-fontawesome-stars-o .br-widget a:after {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
content: '\f005';
color: #d2d2d2;
}
.br-theme-fontawesome-stars-o .br-widget a.br-active:after {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
content: '\f005';
color: #FFB600;
}
.br-theme-fontawesome-stars-o .br-widget a.br-selected:after {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
content: '\f005';
color: #FFB600;
}
.br-theme-fontawesome-stars-o .br-widget .br-current-rating {
display: none;
}
.br-theme-fontawesome-stars-o .br-readonly a {
cursor: default;
}
.br-theme-fontawesome-stars-o .br-widget a.br-fractional:after {
font-weight: 900;
content: '\f089';
color: #FFB600;
}
then, in your front-end page, you should use font awesome CSS from their official CDN
<!--font-awesome package-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
finally, you can use it
$('#YourComponentID').barrating({
theme: 'fontawesome-stars-o',
readonly: true,
initialRating: 4.5
});
it works fine for me.
from jquery-bar-rating.
Related Issues (20)
- Changing fontawesome icon doesn't work HOT 1
- Packagist integration
- Different icons for dynamic rating creation
- Icons appearing really small
- The star is not showing HOT 1
- How to include jquery-bar-rating in webpack build? HOT 1
- Fixing Accessibility Issues HOT 3
- Only Displaying 'unfilled' stars and not correspond to rating value
- All records show the same star rating as the very first record HOT 1
- onSelect return empty value if the rating was set programmatically
- Support for font-awesome 5 Free HOT 1
- theme: 'bars-square' not seem to work right HOT 1
- Chrome 41 Issue
- "An invalid form control with name='' is not focusable"
- 'set' method replace html-data values
- The problem with "movie rating."
- Support for Bootstrap's .invalid-feedback HOT 1
- Error if more than 1 form is on the page?
- WHERE I CAN RESIZE THE STAR?????
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 jquery-bar-rating.