<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>evolutionStarRating jQuery Plugin</title><link>https://community.telligent.com/community/11/w/api-documentation/67152/evolutionstarrating-jquery-plugin</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>evolutionStarRating jQuery Plugin</title><link>https://community.telligent.com/community/11/w/api-documentation/67152/evolutionstarrating-jquery-plugin</link><pubDate>Tue, 19 Nov 2019 20:29:22 GMT</pubDate><guid isPermaLink="false">c4fbf7df-5f4c-4961-ae92-4b5dfcfdde50</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/api-documentation/67152/evolutionstarrating-jquery-plugin#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 11/19/2019 20:29:22&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;&lt;a id="jQuery_fn_evolutionStarRating" name="jQuery_fn_evolutionStarRating"&gt;&lt;/a&gt;jQuery.fn.evolutionStarRating&lt;/h3&gt;
&lt;p&gt;This plugin supports rendering a rating value as stars, along with allowing the user to select a new rating.&lt;/p&gt;
&lt;h3&gt;&lt;a id="Usage" name="Usage"&gt;&lt;/a&gt;Usage&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).evolutionStarRating(options)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;where &amp;#39;SELECTOR&amp;#39; is a span.&lt;/p&gt;
&lt;h3&gt;&lt;a id="Options" name="Options"&gt;&lt;/a&gt;Options&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;value&lt;/code&gt;: (number) initial value to render
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxRating&lt;/code&gt;: (number) number of stars to render
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;5&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;imagesPathUrl&lt;/code&gt;: (string) path to star images with a trailing slash.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useHalfStars&lt;/code&gt;: (bool) whether or not to support halves
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;false&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;starClass&lt;/code&gt;: class to apply to stars
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;&amp;#39;rating&amp;#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;overClass&lt;/code&gt;: css class to apply to a star when mouse is over it
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;&amp;#39;active&amp;#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;readOnlyClass&lt;/code&gt;: css class to apply to a star it is read-only
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;&amp;#39;readonly&amp;#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;titles&lt;/code&gt;: array of string titles to use for stars
&lt;ul&gt;
&lt;li&gt;default &lt;code&gt;['Terrible','Poor','Fair','Average','Good','Excellent']&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isReadOnly&lt;/code&gt;: (bool) read only status&lt;/li&gt;
&lt;li&gt;&lt;code&gt;allowMultipleSelections&lt;/code&gt;: (bool) whether to allow multiple selections&lt;/li&gt;
&lt;li&gt;&lt;code&gt;starElement&lt;/code&gt;: (string) type of element to render &lt;em&gt;default&lt;/em&gt;: &lt;code&gt;img&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onRate&lt;/code&gt;: (function) callback function when a selection is made. is passed selected value.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a id="Methods" name="Methods"&gt;&lt;/a&gt;Methods&lt;/h3&gt;
&lt;h4&gt;&lt;a id="val" name="val"&gt;&lt;/a&gt;val&lt;/h4&gt;
&lt;p&gt;Returns (and sets if passed a second optional value) the current value of the rating&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// get the value
var value = $(&amp;#39;SELECTOR&amp;#39;).evolutionStarRating(&amp;#39;val&amp;#39;);

// set the value
$(&amp;#39;SELECTOR&amp;#39;).evolutionStarRating(&amp;#39;val&amp;#39;, .5);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;&lt;a id="readOnly" name="readOnly"&gt;&lt;/a&gt;readOnly&lt;/h4&gt;
&lt;p&gt;Returns (and/or sets if passed a second optional Boolean value) the read-only state of the control&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// get the readonly status
$(&amp;#39;SELECTOR&amp;#39;).evolutionStarRating(&amp;#39;readOnly&amp;#39;)

// set the readonly status
$(&amp;#39;SELECTOR&amp;#39;).evolutionStarRating(&amp;#39;readOnly&amp;#39;, true)
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h3&gt;
&lt;p&gt;Given the following span to contain a rating control:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;span id=&amp;quot;ratingControl&amp;quot; title=&amp;quot;Rated Good [4 out of 5].&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The following will initialize a star rating control, using defaults for most options&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var ratingControl = $(&amp;#39;#ratingControl&amp;#39;);
ratingControl.evolutionStarRating({
    value: 4,  //  initial value of rating
    isReadOnly: false,
    onRate: function(value) {
        alert(value + &amp;#39; selected!&amp;#39;);

        // Temporarily disable editing of rating during saving
        ratingControl.evolutionStarRating(&amp;#39;readOnly&amp;#39;, true);

        // ...perform AJAX-based saving of rating here...

        // After a successful save, turn off the read-only state of the control
        ratingControl.evolutionStarRating(&amp;#39;readOnly&amp;#39;, false);
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>