Skip to content

Commit

Permalink
onComplete is now called when the loading bar reaches 100 percent
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythli committed Aug 26, 2013
1 parent ca413fe commit 307cfb6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 43 deletions.
82 changes: 41 additions & 41 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<title>ytLoad demo</title>
<link href="ytLoad.jquery.css" rel="stylesheet" type="text/css">
<head>
<title>ytLoad demo</title>
<link href="ytLoad.jquery.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.transit.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.transit.js"></script>

<script type="text/javascript" src="ytLoad.jquery.js"></script>
<script type="text/javascript">
<script type="text/javascript" src="ytLoad.jquery.js"></script>
<script type="text/javascript">

$(document).ready(function() {
$.ytLoad();
$(document).ready(function() {
$.ytLoad();

$('#loadButton').click(function(){
$('#ajaxContent').load('ajax.html');
$('#loadButton').click(function(){
$('#ajaxContent').load('ajax.html');
});
});
});
</script>
<style>
body {
margin: 0px;
padding: 0px;
background-color: #EBEBEB;
border-bottom: 1px solid #e8e8e8;
}
</script>
<style>
body {
margin: 0px;
padding: 0px;
background-color: #EBEBEB;
border-bottom: 1px solid #e8e8e8;
}

#topBar {
height: 25px;
padding-top: 7px;
padding-bottom: 8px;
padding-left: 15px;
background-color: #F1F1F1;
}
#topBar {
height: 25px;
padding-top: 7px;
padding-bottom: 8px;
padding-left: 15px;
background-color: #F1F1F1;
}

#ajaxContent {
width: 800px;
margin: auto;
margin-top: 15px;
}
</style>
</head>
<body>
<div id="topBar">
<input id="loadButton" type="submit" value="Load">
</div>
<div id="ajaxContent">
</div>
</body>
#ajaxContent {
width: 800px;
margin: auto;
margin-top: 15px;
}
</style>
</head>
<body>
<div id="topBar">
<input id="loadButton" type="submit" value="Load">
</div>
<div id="ajaxContent">
</div>
</body>
</html>
3 changes: 1 addition & 2 deletions ytLoad.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@
$progressBar.delay(settings.fadeDelay);
$progressBar.fadeOut({
complete: function() {
settings.onComplete();
$progressBar.remove();
}
}, settings.fadeDuration);
}
}, settings.completeDuration);

settings.onComplete();
},

error: function() {
Expand Down

0 comments on commit 307cfb6

Please sign in to comment.