Problem in using Ratings plugin

10 views
Skip to first unread message

Deepak Singh

unread,
Feb 28, 2012, 5:05:42 PM2/28/12
to gwtquery
Hi All,

I am using Ratings plugin as follows,

html:

<span class="title-bar" id="loggedInAgentRatingSpan">Rating:
          <input name="star1" type="radio" class="star" value="1"/>
  <input name="star1" type="radio" class="star" value="2"/>
  <input name="star1" type="radio" class="star" value="3"/>
  <input name="star1" type="radio" class="star" value="4"/>
  <input name="star1" type="radio" class="star" value="5"/>
          </span>

Java code:

$("input.star1").as(Ratings).rate();

And the output is just showing 5 plane radio buttons.

What do i need to do more to display stars instead of radio buttons and how to capture the values ?

Thanks
Deepak Singh

Alex opn

unread,
Feb 28, 2012, 5:34:34 PM2/28/12
to gwtq...@googlegroups.com
I never used it, but can see a use case in the future for me. So when someone answers the question I'd like to know how to preset a specific star-value?

Sorry I can't help.

--
You received this message because you are subscribed to the Google Groups "gwtquery" group.
To post to this group, send email to gwtq...@googlegroups.com.
To unsubscribe from this group, send email to gwtquery+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwtquery?hl=en.

Manuel Carrasco Moñino

unread,
Feb 29, 2012, 6:36:13 AM2/29/12
to gwtq...@googlegroups.com
you are using a wrong css selector to choose the inputs, if you want to use the class selector, your code should be:
$("input.star").as(Ratings).rate();

Otherwise If you wanted to use the name attribute instead of the class name you should use the selector:
$("input[name=star1]").as(Ratings).rate();

- Manolo

Deepak Singh

unread,
Feb 29, 2012, 10:39:39 AM2/29/12
to gwtq...@googlegroups.com
Thanks. working now.

Deepak Singh
Reply all
Reply to author
Forward
0 new messages