源代码/shop/WebRoot/js/jquery.raty.js
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty
* --------------------------------------------------------------------------
*
* jQuery Raty is a plugin that generates a customizable star rating automatically.
*
* Licensed under The MIT License
*
* @version 0.5
* @since 11.06.2010
* @author Washington Botelho dos Santos
* @link http://wbotelhos.com/raty
* @twitter http://twitter.com/wbotelhos
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @package jQuery Plugins
*
* Usage (default values):
* --------------------------------------------------------------------------
* $('div#star').raty({
* cancelHint: 'cancel this rating!', // The hint information.
* cancelOff: 'cancel-off.png' // The image of the off cancel.
* cancelOn: 'cancel-on.png' // The image of the on cancel.
* cancelPlace: 'left', // Position of the cancel button.
* hintList: ['bad', 'poor', 'regular', 'good', 'gorgeous'], // A hint information for default 5 stars.
* number: 5, // Number of star.
* path: 'img, // Path of images.
* readOnly: false, // read-only or not.
* scoreName: 'score', // The name of target score.
* showCancel: false, // If will be showed a button to cancel the rating.
* showHalf: false, // Active the half star.
* starHalf: 'star-half.png', // The image of the half star.
* start: 0, // Start with a score value.
* starOff: 'star-off.png', // The image of the off star.
* starOn: 'star-on.png' // The image of the on star.
* //onClick: function() { alert('clicked!'); } // A default function can to be setted here.
* });
*
* <div id="star"></div>
*
* Public functions:
* --------------------------------------------------------------------------
* $.fn.raty.start(3); // Starting the rating with 3 stars later.
* $.fn.raty.readOnly(true); // Adjusts the rating for read-only later.
* $.fn.raty.click(2); // Click in a star later.
*
* Should come after the current raty and before the anothers one. Because it takes the last called raty.
*
*/
(function($) {
// TODO: How to handle a particular container from a public function?
$.fn.raty = function(settings) {
options = $.extend({}, $.fn.raty.defaults, settings);
if (this.attr('id') === undefined) {
debug('Invalid selector!'); return;
}
后面还有 245 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。