Skip to content

Commit

Permalink
start progressBar
Browse files Browse the repository at this point in the history
  • Loading branch information
acazsouza committed Apr 24, 2012
1 parent 02493f7 commit 3d1e1b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/index.html
Expand Up @@ -10,9 +10,13 @@
#first-number { left:40% }
#second-number { left:50% }
#third-number { left:60% }
.progress-bar { width:100%; height:20px; border:solid 1px #000; position:relative }
.progress-bar .bar { width:100%; height:20px; position:absolute; right:0; background-color:red }
</style>
</head>
<body>
<div id="progress-bar" class="progress-bar"><div class="bar"></div></div>

<p id="expression"></p>

<div>
Expand Down Expand Up @@ -51,6 +55,9 @@
}

fields[index].innerHTML = expression.correctAnswer;

var progressBar = $('#progress-bar').progressBar({ velocity: 10000 });
progressBar.progressBar('start');
}

window.onload = applyNewExpression;
Expand Down
7 changes: 3 additions & 4 deletions tests/jQuery.ProgressBarTests.html
Expand Up @@ -12,17 +12,16 @@
<script type="text/javascript" src="../src/jquery.progressbar.js"></script>

<style type="text/css">
.barProgress { width:100%; height:20px; border:solid 1px #000; position:relative }

.barProgress .bar { width:100%; height:20px; position:absolute; right:0; background-color:red }
.progress-bar { width:100%; height:20px; border:solid 1px #000; position:relative }
.progress-bar .bar { width:100%; height:20px; position:absolute; right:0; background-color:red }
</style>

<script type="text/javascript">
$(function () {

module("$.progressBar() Tests", {
setup: function () {
var HTMLStub = '<div id="div-id" class="barProgress"><div class="bar"></div></div>';
var HTMLStub = '<div id="div-id" class="progress-bar"><div class="bar"></div></div>';
$(HTMLStub).appendTo('body');
},
teardown: function () {
Expand Down

0 comments on commit 3d1e1b5

Please sign in to comment.