Click here to Skip to main content
Click here to Skip to main content
Go to top

Simple rating control using jQuery

, 4 Dec 2012
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

Comments and Discussions

 
QuestionRight to left direction PinmemberMember 1051364231-May-14 21:31 
QuestionSet rating control as readonly after rateEnd event PinmemberMember 1051364219-May-14 21:40 
AnswerRe: Set rating control as readonly after rateEnd event Pinmembermahongtao19-May-14 23:48 
QuestionServer Side - Help!? PinmemberMember 107242181-May-14 0:23 
GeneralMy vote of 5 Pinmemberdr.progeny25-Apr-13 20:17 
GeneralRe: My vote of 5 Pinmembermahongtao25-Apr-13 21:04 
QuestionHow can i inter change blue color and orange color? Pinmemberbalajikcp814-Feb-13 2: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? Pinmembermahongtao25-Apr-13 20:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web01 | 2.8.140916.1 | Last Updated 4 Dec 2012
Article Copyright 2012 by mahongtao
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid