Hi guys,
I have poll on my website and I want to animate the resultbar so when someone visites the page the resultbars will slide in.
Hope someone can help me with this.
Here is my code so far:
Html
Code:
<div id="poll">
<form method="post" action="">
<fieldset>
<div class="txt_center"><b>Poll Title</b></div>
<div class="option odd">
<div class="text">Question 01</div>
<div class="percent right">
0% [0]
</div>
<div class="resultbar">
<div class="pollbar" style="width:0%;"></div>
</div>
</div>
<div class="option even">
<div class="text">Question 02</div>
<div class="percent right">
50% [1] <b title="You voted for this option">x</b>
</div>
<div class="resultbar">
<div class="pollbar" style="width:50%;"></div>
</div>
</div>
<div class="option odd">
<div class="text">Question 03</div>
<div class="percent right">
50% [1]
</div>
<div class="resultbar">
<div class="pollbar" style="width:50%;"></div>
</div>
</div>
<div class="txt_center"><b>Total Votes : 2</b></div>
</fieldset>
</form>
</div>
Jquery:
Code:
$(document).ready(function() {
$('#poll .resultbar').hide();
$('#poll .resultbar').animate({width: 'toggle'}, 2000);
});
Im trying to do something like this:
http://demos.net.tutsplus.com/test_poll/
However im not really sure how I can use it with my code.