Stars Rating - add default value + change rating on click in


Topic: Stars Rating - add default value + change rating on click instead of on hover

ungovernable pro asked 1 months ago

Using MDB Pro, how can I set a default rating of 5 stars with the rating plugin?

I also would like to know if it is possible to change the rating only when clicking on the stars instead of changing on hover. The reason is that when filling a form its possible you will hover the mouse on the stars by mistake, changing the rating unknowingly.

Thanks


Grzegorz Bujański staff commented 1 months ago

Hi. To set 5 stars by default, add css .amber-text to each star. Unfortunately, at the moment it is not possible to disable change the rating on hover.


ungovernable pro commented 1 months ago

Hi, after adding .amber-text it is impossible to change the rating. It's stuck to 5 stars and the user can't change it. What I want to do is to have a default state of 5 stars but still let the user change the rating.


Grzegorz Bujański staff commented 1 months ago

Check out this snippet: Here it works fine: https://mdbootstrap.com/snippets/jquery/grzegorz-bujanski/2184626#js-tab-view


Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.19.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags