Click here to Skip to main content
12,760,992 members (30,756 online)
Click here to Skip to main content
Add your own
alternative version


12 bookmarked
Posted 4 Dec 2012

Simple rating control using jQuery

, 4 Dec 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
A jQuery rating control.


How to use

  1. Include the necessary JS and CSS files.
  2. <script type="text/javascript" src="rating.js"></script>
    <link rel="stylesheet" type="text/css" href="rating.css" />
  3. Create a text box element (the class "rating10" contains a num "10", this will display 10 starts).
  4. <input type="text" class="rating rating10" />
  5. Fire plug-in using jQuery selector.
  6. $(function ()
  7. When form submits, you can access these values in the server-side script using $_POST (PHP), Request.Form (ASP or ASP.NET).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

China China
No Biography provided

You may also be interested in...


Comments and Discussions

QuestionDisplay value Pin
Ceil Phantomhive3-Nov-16 2:35
memberCeil Phantomhive3-Nov-16 2:35 
GeneralMy vote of 4 Pin
Manojamsoft9-Jun-16 4:41
memberManojamsoft9-Jun-16 4:41 
GeneralMy vote of 4 Pin
Manojamsoft9-Jun-16 4:40
memberManojamsoft9-Jun-16 4:40 
QuestionUncaught Type Error Pin
NikiGrly12-Jan-16 4:18
memberNikiGrly12-Jan-16 4:18 
QuestionHow can we clear the control after submit? Pin
Visanth V Nair24-Nov-14 22:19
memberVisanth V Nair24-Nov-14 22:19 
QuestionRight to left direction Pin
Member 1051364231-May-14 22:31
memberMember 1051364231-May-14 22:31 
AnswerRe: Right to left direction Pin
Member 1209985117-Jan-16 22:51
memberMember 1209985117-Jan-16 22:51 
QuestionSet rating control as readonly after rateEnd event Pin
Member 1051364219-May-14 22:40
memberMember 1051364219-May-14 22:40 
AnswerRe: Set rating control as readonly after rateEnd event Pin
mahongtao20-May-14 0:48
membermahongtao20-May-14 0:48 
QuestionServer Side - Help!? Pin
Member 107242181-May-14 1:23
memberMember 107242181-May-14 1:23 
AnswerRe: Server Side - Help!? Pin
Member 1209985117-Jan-16 22:45
memberMember 1209985117-Jan-16 22:45 
GeneralMy vote of 5 Pin
dr.progeny25-Apr-13 21:17
memberdr.progeny25-Apr-13 21:17 
GeneralRe: My vote of 5 Pin
mahongtao25-Apr-13 22:04
membermahongtao25-Apr-13 22:04 
QuestionHow can i inter change blue color and orange color? Pin
balajikcp814-Feb-13 3:18
memberbalajikcp814-Feb-13 3:18 
i want orange color as static and blue on mouse over. How can i achieve?
AnswerRe: How can i inter change blue color and orange color? Pin
mahongtao25-Apr-13 21:31
membermahongtao25-Apr-13 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 4 Dec 2012
Article Copyright 2012 by mahongtao
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid