Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery star rating - Fyneworks.com
    primarykey
    data
    text
    <p>I'm trying to duplicate the rating plugin that is used elsewhere in our code but it is failing. It may be that I have included the js and css in the wrong sequence. Also the stars do not show up unless I change the class to STAR. As it is I just get radio buttons. The event never fires. When comparing the two pages ( the new one and the one that works) in dev tools, everything seems to be the same.</p> <pre><code> &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;link href='/assets/css/jquery.rating.css' type="text/css" rel="stylesheet"/&gt; &lt;script src='/assets/js/jquery.MetaData.js' type="text/javascript" language="javascript"&gt;&lt;/script&gt; &lt;script src='/assets/js/jquery.rating.pack.js' type="text/javascript" language="javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;script&gt; $(function(){ $('.auto-submit-star').rating({ **Uncaught type error: Object[object Object] has no method 'rating'** callback: function(value, link){ // 'this' is the hidden form element holding the current value // 'value' is the value selected // 'element' points to the link element that received the click. alert("The value selected was '" + value + "'\n\nWith this callback function I can automatically submit the form with this code:\nthis.form.submit();"); // To submit the form automatically: //this.form.submit(); // To submit the form via ajax: //$(this.form).ajaxSubmit(); $.ajax({ url: '/services/Mentor.cfc', data: { method: 'insertRating', rating: value }, //success: function(data){ // if (data == true) { // alert('true!'); // } // else { // alert('false!'); // } //} }); } }); }); &lt;/script&gt; &lt;cfif qRating.recordCount GT 0&gt; &lt;input name="rating_#request.target_id#" type="radio" class="star required" value="#request.target_id#_1"&lt;cfif qRating.rating EQ 1&gt; checked="checked" disabled="disabled"&lt;/cfif&gt; /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="star" value="#request.target_id#_2"&lt;cfif qRating.rating EQ 2&gt; checked="checked" disabled="disabled"&lt;/cfif&gt; /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="star" value="#request.target_id#_3"&lt;cfif qRating.rating EQ 3&gt; checked="checked" disabled="disabled"&lt;/cfif&gt; /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="star" value="#request.target_id#_4"&lt;cfif qRating.rating EQ 4&gt; checked="checked" disabled="disabled"&lt;/cfif&gt; /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="star" value="#request.target_id#_5"&lt;cfif qRating.rating EQ 5&gt; checked="checked" disabled="disabled"&lt;/cfif&gt; /&gt; &lt;cfelse&gt; &lt;input name="rating_#request.target_id#" type="radio" class="auto-submit-star star required" value="#request.target_id#_1" /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="auto-submit-star star" value="#request.target_id#_2" /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="auto-submit-star star" value="#request.target_id#_3" /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="auto-submit-star star" value="#request.target_id#_4" /&gt; &lt;input name="rating_#request.target_id#" type="radio" class="auto-submit-star star" value="#request.target_id#_5" /&gt; &lt;/cfif&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload