jQuery mimics the five star evaluation method based on layers

  • 2020-06-12 08:25:04
  • OfStack

This article gives an example of how jQuery mimics the 5 star evaluation function based on layers. Share to everybody for everybody reference. Specific implementation methods are as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Untitled document </title>
<script src="jquery-1.6.2.min.js" type="text/javascript"></script>
$(".star li").mouseenter(function(){
 $(".star li").css("background","#f60");
<style type="text/css">
* {<br />
 list-style:none; float:left;
.star li {
 float: left;
 height: 20px;
 width: 20px;
 background-color: #CCC;
 margin-right: 4px;
<div> Choose a few star: </div>
<ul class="star">

Hopefully, this article has been helpful in your jQuery programming.

Related articles: