raty::star2:Raty-星级评分插件

  • R4_828415
    了解作者
  • 157.9KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-13 12:54
    上传日期
Raty-星级评分插件 Rails评级? 这是等级: : :white_medium_star: 图片使用 jquery.raty.js star-off.png star-on.png &lt; script src =" jquery.raty.js " &gt; &lt;/ script &gt; < div> </ div> $ ( 'div' ) . raty ( ) ; 字体使用 jquery.raty.js jquery.raty。[eot | svg | ttf | woff] jquery.raty.css &lt; link rel =" stylesheet " href =" jquery.raty.css " &gt; &lt; script src =" jquery.raty.js " &gt; &lt;/ script &gt; < div> </ div> $ ( 'div' ) . raty ( { starType
raty-master.zip
  • raty-master
  • .eslintrc.json
    661B
  • .gitignore
    49B
  • package.json
    1.2KB
  • karma.conf.js
    424B
  • changelog.md
    11.3KB
  • LICENSE
    1KB
  • composer.json
    463B
  • .hound.yml
    83B
  • .github
  • FUNDING.yml
    19B
  • workflows
  • ci.yml
    882B
  • spec
  • models
  • _adjustNumberSpec.js
    844B
  • _attributesForIndexSpec.js
    4.3KB
  • _adjustHintsSpec.js
    3.9KB
  • _betweenSpec.js
    943B
  • _adjustPrecisionSpec.js
    400B
  • _createStarsSpec.js
    2.8KB
  • _nameForIndexSpec.js
    2.3KB
  • _setPathSpec.js
    1.7KB
  • _adjustedScoreSpec.js
    2KB
  • _starNameSpec.js
    13.3KB
  • _getDecimalSpec.js
    2.2KB
  • _adjustStarNameSpec.js
    971B
  • optionsSpec.js
    1.7KB
  • _executeCallbacksSpec.js
    1.6KB
  • _createSpec.js
    6.3KB
  • vendor
  • jasmine-jquery.js
    25.9KB
  • lib
  • helper.js
    2.9KB
  • features
  • fn_get_score_spec.js
    1.8KB
  • stars_spec.js
    2.1KB
  • target_spec.js
    6.5KB
  • score_spec.js
    1.8KB
  • cancel_on_spec.js
    748B
  • target_format_spec.js
    2.2KB
  • target_text_spec.js
    515B
  • star_off_spec.js
    2.5KB
  • chainable_spec.js
    476B
  • number_spec.js
    972B
  • cancel_class_spec.js
    605B
  • icon_range_spec.js
    5.7KB
  • half_spec.js
    28.1KB
  • target_score_spec.js
    887B
  • target_type_spec.js
    2KB
  • mouseover_spec.js
    1.2KB
  • cancel_hint_spec.js
    655B
  • fn_set_score_spec.js
    2.1KB
  • markup_spec.js
    1.5KB
  • cancel_place_spec.js
    988B
  • cancel_off_spec.js
    796B
  • hints_spec.js
    74.1KB
  • fn_cancel_spec.js
    3KB
  • space_spec.js
    1.3KB
  • fn_click_spec.js
    2.2KB
  • score_name_spec.js
    656B
  • number_max_spec.js
    629B
  • star_type_spec.js
    3.7KB
  • mouseout_spec.js
    2.7KB
  • click_spec.js
    3.9KB
  • readonly_spec.js
    9.6KB
  • cancel_spec.js
    8.1KB
  • fn_readonly_spec.js
    12.4KB
  • path_spec.js
    2.3KB
  • precision_spec.js
    8.5KB
  • star_on_spec.js
    2.5KB
  • fn_move_spec.js
    3KB
  • single_spec.js
    4.2KB
  • README.md
    6.4KB
  • demo
  • fonts
  • blogy.woff
    5.1KB
  • blogy.ttf
    5KB
  • blogy.svg
    11.1KB
  • blogy.eot
    5.2KB
  • images
  • 2.png
    626B
  • 3.png
    581B
  • star-half-mono.png
    459B
  • cancel-off.png
    1.3KB
  • 5.png
    623B
  • cancel-custom-on.png
    796B
  • cancel-custom-off.png
    680B
  • star-on.png
    1KB
  • 1.png
    641B
  • star-half.png
    958B
  • 0.png
    505B
  • off.png
    700B
  • cancel-on.png
    4.2KB
  • 4.png
    723B
  • star-off.png
    930B
  • on.png
    782B
  • javascripts
  • labs.js
    12.9KB
  • stylesheets
内容介绍
# Raty - A Star Rating Plugin [![CI](https://github.com/wbotelhos/raty/workflows/CI/badge.svg)](https://github.com/wbotelhos/raty/actions) [![NPM Version](https://badge.fury.io/js/raty-js.svg)](https://badge.fury.io/js/raty-js) [![Maintainability](https://codeclimate.com/github/wbotelhos/raty.png)](https://codeclimate.com/github/wbotelhos/raty) [![Sponsor](https://img.shields.io/badge/sponsor-%3C3-green)](https://www.patreon.com/wbotelhos) ## Rails Rating? This is **Rating**: https://github.com/wbotelhos/rating :star: ## Usage with Image - jquery.raty.js - star-off.png - star-on.png ```html <script src="jquery.raty.js"></script> <div></div> ``` ```js $('div').raty(); ``` ## Usage with Font - jquery.raty.js - jquery.raty.[eot|svg|ttf|woff] - jquery.raty.css ```html <link rel="stylesheet" href="jquery.raty.css"> <script src="jquery.raty.js"></script> <div></div> ``` ```js $('div').raty({ starType: 'i' }); ``` ## Options | Property | Default |Description | |--------------|------------------------------------------------|-----------------------------------------------------------------| |`cancel` |`false` |Creates a cancel button to cancel the rating. | |`cancelClass` |`'raty-cancel'` |Name of cancel's class. | |`cancelHint` |`'Cancel this rating!'` |The cancel's button hint. | |`cancelOff` |`'cancel-off.png'` |Icon used on active cancel. | |`cancelOn` |`'cancel-on.png'` |Icon used inactive cancel. | |`cancelPlace` |`'left'` |Cancel's button position. | |`click` |`undefined` |Callback executed on rating click. | |`half` |`false` |Enables half star selection. | |`halfShow` |`true` |Enables half star display. | |`hints` |`['bad', 'poor', 'regular', 'good', 'gorgeous']`|Hints used on each star. | |`iconRange` |`undefined` |Object list with position and icon on and off to do a mixed icons| |`mouseout` |`undefined` |Callback executed on mouseout. | |`mouseover` |`undefined` |Callback executed on mouseover. | |`noRatedMsg` |`'Not rated yet!'` |Hint for non rated elements when it's readOnly. | |`number` |`5` |The number of stars that will be presented. | |`numberMax` |`20` |Max number of stars star the option number will create. | |`path` |`undefined` |A global path where the icon will be found. | |`precision` |`false` |Enables the selection of a precise score. | |`readOnly` |`false` |Turns the rating read-only. | |`round` |`{ down: .25, full: .6, up: .76 }` |Includes value attributes to do the score rounding math. | |`score` |`undefined` |Initial rating. | |`scoreName` |`'score'` |Name of the hidden field that holds the score value. | |`single` |`false` |Enables single star selection. | |`space` |`true` |Puts space between the icons. | |`starHalf` |`'star-half.png'` |The name of the half star image. | |`starOff` |`'star-off.png'` |Name of the star image off. | |`starOn` |`'star-on.png'` |Name of the star image on. | |`target` |`undefined` |Element selector where the score will be displayed. | |`targetFormat`|`'{score}'` |Template to interpolate the score in. | |`targetKeep` |`false` |If the last rating value will be kept on mouseout. | |`targetScore` |`undefined` |Score field target avoiding hidden field creation | |`targetText` |`''` |Default text in a target. | |`targetType` |`'hint'` |Choose if target will receive a hint or the score number | |`starType` |`'img'` |Element used to represent a star. | ## Functions | Function | Description | |-----------------------------------------|-----------------------------------------------------------| |`$('div').data('raty).score();` |Get the current score. | |`$('div').data('raty).score(number);` |Set a score. | |`$('div').data('raty).click(number);` |Click on a star. | |`$('div').data('raty).readOnly(boolean);`|Change the read-only state. | |`$('div').data('raty).cancel(boolean);` |Cancel the rating. The last param force the click callback.| |`$('div').data('raty).move(number);` |Move the mouse to the given score point position. |
评论
    相关推荐