Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:03:56
Original
2113 people have browsed it

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.

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!