filmov
tv
jQuery Ratings Plugin with Database & Average Calculation

Показать описание
jQuery Rating Plugin with Database & Average Calculation
Whenever people go online and try to buy something, the first thing most people check is the RATING of that product. There are many ways to display a widget that will get feedback from the user about that product, the most common of them is the star ratings. 5 stars are displayed and asked the user to choose how many stars he wants to give to that product. Suppose 100 people have rated to some product, now you want to show the average of that ratings. By following this tutorial you will be able to display a widget from where users can give star ratings out of 5, save that rating in MySQL database with that product, and display the average of those ratings also in star widget.
The name of the library is Starrr and it can be downloaded for free from the following link. The library is extremely lightweight (less than 75 lines of code).
- Display a star rating widget and get its value
- Save that value in the database
- Get all stars and calculate their average
- Display the average again in star widget
- Make the average widget read-only (un-changeable)
Source code:
Starrr:
Whenever people go online and try to buy something, the first thing most people check is the RATING of that product. There are many ways to display a widget that will get feedback from the user about that product, the most common of them is the star ratings. 5 stars are displayed and asked the user to choose how many stars he wants to give to that product. Suppose 100 people have rated to some product, now you want to show the average of that ratings. By following this tutorial you will be able to display a widget from where users can give star ratings out of 5, save that rating in MySQL database with that product, and display the average of those ratings also in star widget.
The name of the library is Starrr and it can be downloaded for free from the following link. The library is extremely lightweight (less than 75 lines of code).
- Display a star rating widget and get its value
- Save that value in the database
- Get all stars and calculate their average
- Display the average again in star widget
- Make the average widget read-only (un-changeable)
Source code:
Starrr:
Комментарии