Hello guys i am facing a problem i dont know why. i am upto making barcharts in jQuery but it is displaying in IE not FF.Please Help to fix this problem for me.thanks
i have attacted the file below so you can test in your server.so for the all jQuery and css code in one page.As well i have pasted the code below.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamic Bar Chart with jQuery and CSS</title>
<meta name="description" content="Dynamic Bar Chart with jQuery and CSS" />
<meta name="keywords" content="Dynamic Bar Chart with jQuery and CSS" />
<script src="http://ajax.googleapis.com/
ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
[B]$(document).ready(function(){
$('#charts li').each(function(){
var pc = $(this).attr('title');
pc = pc > 100 ? 100 :pc;
$(this).children('.percent').html(pc+ '%');
var ww = $(this).width();
var len = parseInt(ww, 10) * parseInt(pc, 10) / 100;
$(this).children('.bar').animate({'width': len + 'px'},1500);
});
});[/B]
</script>
<style type="text/css">
*{
margin:0px;
padding:0px;
outline:none;
border:none;
color:#fff;
}
body{
font-size:12px;
line-height:20px;
background:#111;
padding:30px 0;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
}
#wrapper
{
width:600px;
margin:0 auto;
text-align:left;
}
#charts,#form_values
{
width:559px;
}
#charts
{
list-style:none;
border-left: solid 1px #666;
border-bottom:solid 1px #666;
margin-bottom:20px;
}
#charts li,#chart li span{
height:20px;
}
#charts li .percent{
width:30px;
position:absolute;
top:0;
right:-40px;
text-align:right;
}
#charts li{
position:relative;
display:block;
width:554px;
margin:0 0 5px 5px;
text-align:left;
}
#charts li .bar{
width:0;
}
.red .bar{
background:red;
}
.blue .bar
{
background:blue;
}
.yellow .bar{
background:yellow;
}
.orange .bar{
background:orange;
}
.purple .bar{
background:purple;
}
.field{
padding:3px;
width:50px;
border:solid 1px #000;
float:left;
margin-right:5px;
color:#333;
}
</style>
</head>
<body>
<section id="wrapper">
<ul id="charts">
<li title="25" class="red">
<span class="bar"></span>
<span class="percent"></span>
</li>
<li title="80" class="blue">
<span class="bar"></span>
<span class="percent"></span>
</li>
<li title="65" class="yellow">
<span class="bar"></span>
<span class="percent"></span>
</li>
<li title="50" class="orange">
<span class="bar"></span>
<span class="percent"></span>
</li>
<li title="100" class="purple">
<span class="bar"></span>
<span class="percent"></span>
</li>
</ul>
<form id="form_values" action="" method="post">
<input type="text" id="li_1" value="25" class="field" />
<input type="text" id="li_2" value="80" class="field" />
<input type="text" id="li_3" value="65" class="field" />
<input type="text" id="li_4" value="50" class="field" />
<input type="text" id="li_5" value="100" class="field" />
</form>
</section>
</body>
</html>