Admin Admin
Number of posts : 262 Join date : 08.03.12 Age : 62 Dzīvesvieta : Talsi
| Tēma: Moderna statistika lapai Piektdiena Jūlijs 26, 2013 4:48 pm | |
| Iekš CSS: - Kods:
-
.cross {padding-top:2px; display:inline-block; padding-bottom:3px; color:#fff; text-align:center; text-shadow:0px 1px 0px rgba(0,0,0,0.25)} Atrodam šo: $ONLINE_COUNTER$ un nomainām pret: - Kods:
-
<div style="display:none;">$ONLINE_COUNTER$</div><div style="float:right;"><span style="">Пользователи</span><span style="margin:0px; margin-left:2px; padding:1px; display:inline-block; border:1px solid #ccc; background:#fff;"><img style="height:7px; width:7px; background:#34a61e;" src="/images/1px.gif" border="0" alt="" /></span></div> <div><span style="margin:0px; margin-right:3px; padding:1px; display:inline-block; border:1px solid #ccc; background:#fff;"><img style="height:7px; width:7px; background:#7d7d7d;" src="/images/1px.gif" border="0" alt="" /></span><span style="">Гости сайта</span></div> <div style="border:1px solid #ccc; background:#fff; padding:1px; margin-top:2px;" id="Statku" align="left"></div> Drusku zemāk liekam skriptu: - Kods:
-
<script type="text/javascript"> var allusers = $(".tOnline b").text(); var gostusers = $(".gOnline b").text(); var siteusers = $(".uOnline b").text(); var uGosti = (gostusers/allusers).toFixed(2)*100; var uUsers = (siteusers/allusers).toFixed(2)*100;
$("#Statku").html('<div class="cross" style="width:'+uGosti+'%; background:#7d7d7d;">'+Math.floor(uGosti)+'%</div><div class="cross" style="width:'+uUsers+'%; background:#34a61e;">'+Math.floor(uUsers)+'%</div>').after('<div style="border:0px; padding:2px; text-align:center;">Всего — '+allusers+'</div>'); </script> | |
|