Click here to Skip to main content
12,068,967 members (67,895 online)
Click here to Skip to main content
Add your own
alternative version

Stats

24.5K views
2.9K downloads
12 bookmarked
Posted

Simple rating control using jQuery

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

503495/demo.gif

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 ()
    {
        $('.rating').rating();
    });
  7. When form submits, you can access these values in the server-side script using $_POST (PHP), Request.Form (ASP or ASP.NET).

License

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

Share

About the Author

mahongtao
China China
No Biography provided

You may also be interested in...

Comments and Discussions

 
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 
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.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.160208.1 | Last Updated 4 Dec 2012
Article Copyright 2012 by mahongtao
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid