Jump to content

Новый простой вид опроса в стиле Flat для uCoz


Recommended Posts



1. В стандартный шаблон вид опросов, добавить этот скрипт (не удаляя ничего что там уже есть): 

<script type="text/javascript"> 
var a = ['1','2','3','4','5','6','1','2','3','4','5','6']; 
for(var i = 0; i < a.length; i++){$('div.answer div').eq(i).addClass('progress');$('div.answer div div').eq(i).addClass('progress'+[i]).css({marginBottom: '-3px', backgroundRepeat: 'repeat-x'});} 
$('div.answer span').each(function(){$(this).html($(this).html()+' - <span class="procent">'+$(this).attr('title').split(':')[1]+'</span>')}); 

2. Закинуть в стили: 

.answer {position:relative;margin:0 0 10px 0;height:25px;padding:0!important;} 
.answer span{z-index:2;position:relative;left:-5px;color:#666;top:5px;text-shadow:0 0 1px #fff;} 
.answer div{position:absolute;top:0px;width:100%;padding:0!important;} 

.progress {  
box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 
-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 
-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);} 

.progress div {height:25px!important;} 
.procent {top:0!important;left:5px!important;} 
.progress0 {background:#fb3c2d!important;} 
.progress1 {background:rgb(32,195,209)!important;} 
.progress2 {background:rgb(133,202,45)!important;} 
.progress3 {background:rgb(231,197,19)!important;} 
.progress4 {background:rgb(22,184,206)!important;} 
.progress5 {background:rgb(32,195,209)!important;} 
.progress6 {background:rgb(32,195,209)!important;}


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...