Home  >  Article  >  Web Front-end  >  jquery plug-in star-rating.js implements star rating special effects_jquery

jquery plug-in star-rating.js implements star rating special effects_jquery

WBOY
WBOYOriginal
2016-05-16 16:03:562147browse

Introduction to special effects

Download the jquery star rating plug-in star-rating.js. Click on the left side of the star or heart to get half a point, and to the right side is 1 point. Click the minus sign to set the score to 0. Not compatible with browsers below IE8.

Demo picture

How to use

The first step is to introduce the following code:

Copy code The code is as follows:

http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">

The second step is to introduce the corresponding input box for what effect you want to use:

Copy code The code is as follows:

data-symbol="" data-default-caption="{rating} hearts" data-star-captions="{}">

The third step, if you need to reset or submit the button, you can introduce the following code:

Copy code The code is as follows:



The fourth step is to introduce js calling code:

Copy code The code is as follows:

<script><br> jQuery(document).ready(function () {<br>          $(".rating-kv").rating();<br> });<br> </script>

Download from this site Demo address

The above is the entire content of this article, I hope you all like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn