Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

ungovernable free asked 4 years 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 4 years 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 free commented 4 years 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 4 years 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.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No