{"_id":"rater-jquery","_rev":"3-00cd15b4d1164a23a278f6bfbf7dd316","name":"rater-jquery","description":"A highly customizable rating widget that supports images, utf8 glyphs and other html elements","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"rater-jquery","title":"Rater","description":"A highly customizable rating widget that supports images, utf8 glyphs and other html elements","keywords":["rater","jquery-plugin","rating","star","widget"],"version":"1.0.0","author":{"name":"Mohammad A.raji"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"bugs":{"url":"https://github.com/auxiliary/rater/issues/new"},"main":"rater.js","repository":{"type":"git","url":"git+https://github.com/auxiliary/rater.git"},"homepage":"https://github.com/auxiliary/rater","license":"MIT","gitHead":"0831401250a971c16b2d66ca63302ba186d97927","_id":"rater-jquery@1.0.0","scripts":{},"_shasum":"7740134d0624a8db67d85ea612d9731370939560","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jeloo","email":"i.v.yaroslavtsev@gmail.com"},"dist":{"shasum":"7740134d0624a8db67d85ea612d9731370939560","tarball":"https://registry.npmjs.org/rater-jquery/-/rater-jquery-1.0.0.tgz","integrity":"sha512-dRI4H8itm7zp6B2VWbYJMqaVSXwUuosZ1VgOA0OLJVzQwrA1RaHaZliNh8Y/bbTVoiEUPkj5yW2U7oKkLqXcIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAS1AMZCjIneqQi2MHN/TQ8OsdmvZ9SNpoITsJTTzWsRAiABSlMqOJAkQMDSTPrJfoSxnUOpWN+8NwuNYFJ40TFY5A=="}]},"maintainers":[{"name":"jeloo","email":"i.v.yaroslavtsev@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rater-jquery-1.0.0.tgz_1481061720129_0.6034870319999754"}}},"readme":"# rater\nA highly customizable rating widget that supports images, utf8 glyphs and other html elements!\n\n[![Build Status](https://travis-ci.org/auxiliary/rater.svg?branch=master)](https://travis-ci.org/auxiliary/rater)\n\n#### Simple usage\n\nDepends on jQuery\n\n```javascript\n// Options\nvar options = {\n    max_value: 10,\n    step_size: 0.5,\n    initial_value: 0,\n    selected_symbol_type: 'utf8_star', // Must be a key from symbols\n    cursor: 'default',\n    readonly: false,\n    change_once: false, // Determines if the rating can only be set once\n    ajax_method: 'POST',\n    url: 'http://localhost/test.php',\n    additional_data: {} // Additional data to send to the server\n}\n\n$(\".rating\").rate(options);\n```\n\nThe data-rate-value attribute is optional. The value will fallback to the initial\nvalue in the settings and to 0 if not provided.\n```html\n<div class=\"rating\" data-rate-value=6></div>\n```\n\n#### Useful methods\n\n```javascript\n$(\".rating\").rate(\"getValue\");\n$(\".rating\").rate(\"setValue\");\n$(\".rating\").rate(\"increment\");\n$(\".rating\").rate(\"decrement\");\n$(\".rating\").rate(\"getElement\", layer_name, element_index);\n$(\".rating\").rate(\"getLayers\");\n$(\".rating\").rate(\"setFace\", value, face);\n$(\".rating\").rate(\"removeFace\", value);\n\n// Set additional information to be sent with the ajax request\n$(\".rate2\").rate(\"setAdditionalData\", {id: 42});\n$(\".rate2\").rate(\"getAdditionalData\");\n```\n\n#### Useful events\n```javascript\n$(\".rating\").on(\"change\", function(ev, data){\n  console.log(data.from, data.to);\n});\n\n$(\".rate2\").on(\"updateSuccess\", function(ev, data){\n    console.log(\"This is a custom success event\");\n});\n\n$(\".rate2\").on(\"updateError\", function(ev, jxhr, msg, err){\n    console.log(\"This is a custom error event\");\n});\n```\n\n#### Deleting\n\n```javascript\n$(\".rating\").rate(\"destroy\");\n$(\".rating\").remove(); //This will remove the elements from the DOM\n```\n","maintainers":[{"name":"jeloo","email":"i.v.yaroslavtsev@gmail.com"}],"time":{"modified":"2022-06-25T13:06:35.805Z","created":"2016-12-06T22:02:02.102Z","1.0.0":"2016-12-06T22:02:02.102Z"},"homepage":"https://github.com/auxiliary/rater","keywords":["rater","jquery-plugin","rating","star","widget"],"repository":{"type":"git","url":"git+https://github.com/auxiliary/rater.git"},"author":{"name":"Mohammad A.raji"},"bugs":{"url":"https://github.com/auxiliary/rater/issues/new"},"license":"MIT","readmeFilename":"README.md"}