博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jRating评分插件使用
阅读量:7117 次
发布时间:2019-06-28

本文共 1903 字,大约阅读时间需要 6 分钟。

hot3.png

jRating is a very flexible jQuery plugin for quickly creating an Ajaxed star rating system. It is possible to configure every details from "the number of the stars" to "if the stars can represent decimals or not".
There is also an option to display small or big stars and images can be changed with any other file easily.

Although jRating can be used with any scripting language, a PHP file that handles the requests is already included in the download package on github

IMPLEMENTATION: 

1. FIRST, INCLUDE THE CSS & JQUERY FILES

2. ADD YOUR HTML

3. NOW, CALL THE JRATING PLUGIN

OPTIONS: 
showRateInfoBooleanDefault : 
true - Disable the rate info. Can be set to true or false
bigStarsPathStringDefault : 
'jquery/icons/stars.png' - Relative path of the large star picture (stars.png).
smallStarsPathStringDefault : 
'jquery/icons/small.png' - Relative path of the small star picture (small.png).
phpPathStringDefault : 
'php/jRating.php' - Relative path of the PHP page (jRating.php).
typeStringDefault : 
'big' - Appearance type. Can be set to 'small' or 'big'.
stepBooleanDefault : 
false - If set to true, filling of the stars is done star by star (step by step).
isDisabledBooleanDefault : 
false - If set to true, jRating is disabled
lengthIntegerDefault : 
5 - Number of star to display.
decimalLengthIntegerDefault : 
0 - Number of decimals in the rate
rateMaxIntegerDefault : 
20 - Maximal rate
rateInfosXIntegerDefault : 
45 - In pixel - Absolute left position of the information box during mousemove.
rateInfosYIntegerDefault : 
5 - In pixel - Absolute top position of the information box during mousemove.
METHODS: 
onSuccessFunctionReturns : 
null - Callback function in case of success during rating.
onErrorFunctionReturns : 
null - Callback function in case of failure during rating.
SCREENSHOTS

转载于:https://my.oschina.net/mickelfeng/blog/89588

你可能感兴趣的文章
第三章:垃圾回收器:垃圾回收器的两种算法
查看>>
力扣算法题—091解码
查看>>
两直线异面的充要条件
查看>>
Linux下解决中文乱码问题
查看>>
C++ STL之LIST详解A
查看>>
ANG-----全方位保障您的数字资产安全
查看>>
微信小程序之自定义组件的应用
查看>>
ASP.NET 如何取得 Request URL 的各個部分
查看>>
3.12 在运算和比较时使用NULL值
查看>>
邮件开发一些基础知识
查看>>
1.2、Mybatis二级缓存测试
查看>>
ajax传值
查看>>
hasshmap输出value
查看>>
php 魔法函数__FILE__ ,define()、pathinfo()和dirname()及其basename()函数的简单打印及其效果...
查看>>
HTML5+Css3-webkit-filter
查看>>
Mac下用命令行直接批量转换文本编码到UTF8
查看>>
56个有效且健康的减肥小绝招
查看>>
Unity3D 物体移动方法总结
查看>>
最小二乘法
查看>>
程序员-科技的附庸
查看>>