Jquery评分实例

 

Jquery评分实例,点击可以查看大图
需      要: 0.0 金币
折      扣: 100 (% 折)
 
相关搜索: Jquery评分实例 
下载次数: 3
支持一下(1)
100.00%
踩一下(0)
0.00%
  • 下载等级:
  • 编  号: 20120601162357
  • 浏览器兼容IE6.0及以前,IE7.0,IE8.0,IE9.0,Firefox9.0及以前,Firefox10.0,Chrome17.0及以前,Chrome18.0,Opera
  • 更新日期: 2012-06-01
  • 大  小: 42.11K
  • 浏览次量: 2057
  • 开发者链接: 官网  演示
  • 相  关: 违规举报
  • 收  藏:( 0 人收藏) 加入收藏
  • 此内容校验人员: sinacomcn
分享到:   
17sina  
 中士 上传于/2012-06-01 16:24:59
零星会员   
   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>Jquery评分代码实例 by 25175</title>
<meta name="Design Corp" content="顺通网络" />
<meta name="Author" content="powered by 25175">
<meta name="description" content="Jquery评分代码实例,25175-你我一起舞-软件定制服务"/>
<meta name="Keywords" content="Jquery评分代码实例" />
<script src="images/jquery.js"></script>
<link href="images/startcss.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
$.fn.studyplay_star=function(options,callback){
 //默认设置
 var settings ={
  MaxStar      :20,
  StarWidth    :23,
  CurrentStar  :5,
  Enabled      :true,
  Half         :0
  }; 
 if(options) { jQuery.extend(settings, options); };
 var container = jQuery(this);
 container.css({"position":"relative"})
 .html('<ul class="studyplay_starBg"></ul>') 
 .find('.studyplay_starBg').width(settings.MaxStar*settings.StarWidth)
 .html('<li class="studyplay_starovering" style="width:'+settings.CurrentStar*settings.StarWidth+'px; z-index:0;" id="studyplay_current"></li>');
 if(settings.Enabled)
 {
 var ListArray = ""; 
 if(settings.Half==0)
 {
 for(k=1;k<settings.MaxStar+1;k++)
 { 
  ListArray +='<li class="studyplay_starON" style="width:'+settings.StarWidth*k+'px;z-index:'+(settings.MaxStar-k+1)+';"></li>';
 }
 }
 
 if(settings.Half==1)
 {
 for(k=1;k<settings.MaxStar*2+1;k++)
 { 
  ListArray +='<li class="studyplay_starON" style="width:'+settings.StarWidth*k/2+'px;z-index:'+(settings.MaxStar-k+1)+';"></li>';
 }
 }
 
 container.find('.studyplay_starBg').append(ListArray)
 container.find('.studyplay_starON').hover(function(){            
             $(this).removeClass('studyplay_starON').addClass("studyplay_starovering");
             $("#studyplay_current").hide();
             },
           function(){
            $(this).removeClass('studyplay_starovering').addClass("studyplay_starON");
            $("#studyplay_current").show();
            })
 .click(function(){
     var studyplay_count = settings.MaxStar - $(this).css("z-index")+1;
     if(settings.Half==0)
     $("#studyplay_current").width(studyplay_count*settings.StarWidth)
     if(settings.Half==1)
     $("#studyplay_current").width(studyplay_count*settings.StarWidth/2)
     //回调函数
     if (typeof callback == 'function') {
     if(settings.Half==0)
     callback(studyplay_count);
     if(settings.Half==1)
     callback(studyplay_count/2);
     return ;
     }
     })
 } 

</script>
<script type="text/javascript">
  $(document).ready(function(){
   $("#z").studyplay_star({MaxStar:12,CurrentStar:2,Enabled:true,Half:1},function(value){alert(value)});
  }); 
</script>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="z"></div>
<a href="http;//www.25175.com">25175</a>
</body>
</html>

 购买记录
miladhamzelo
新兵
cping1210
新兵
刘涛_90
新兵
会员评论:  

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

  验证码:
 
反馈请帮助我们提高!意见反馈