Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- fa-star {
- color: rgba(112, 111, 111, 0.856);
- }
- .fa-star:hover {
- color: #e2334c;
- }
- .fa-star.selected {
- color: #001628;
- }
- <script>
- $('.ratings_stars').click(function () {
- $('.ratings_stars').removeClass('selected'); // Removes the selected class from all of them
- $(this).addClass('selected');
- var rating = $(this).data('rating'); // Get the rating from the selected star
- $('#rating').val(rating); // Set the value of the hidden rating form element
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement