-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,268 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* Tiny Scrollbar */ | ||
#scrollbar1 { width: 520px; margin: 20px 0 10px; } | ||
#scrollbar1 .viewport { width: 500px; height: 200px; overflow: hidden; position: relative; } | ||
#scrollbar1 .overview { list-style: none; position: absolute; left: 0; top: 0; padding: 0; margin: 0; } | ||
#scrollbar1 .scrollbar{ background: transparent url(../images/bg-scrollbar-track-y.png) no-repeat 0 0; position: relative; background-position: 0 0; float: right; width: 15px; } | ||
#scrollbar1 .track { background: transparent url(../images/bg-scrollbar-trackend-y.png) no-repeat 0 100%; height: 100%; width:13px; position: relative; padding: 0 1px; } | ||
#scrollbar1 .thumb { background: transparent url(../images/bg-scrollbar-thumb-y.png) no-repeat 50% 100%; height: 20px; width: 25px; cursor: pointer; overflow: hidden; position: absolute; top: 0; left: -5px; } | ||
#scrollbar1 .thumb .end { background: transparent url(../images/bg-scrollbar-thumb-y.png) no-repeat 50% 0; overflow: hidden; height: 5px; width: 25px; } | ||
#scrollbar1 .disable { display: none; } | ||
.noSelect { user-select: none; -o-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; } |
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Tiny Scrollbar: A crossbrowser lightweight javascript/jQuery scrollbar.</title> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="description" content="A crossbrowser lightweight javascript/jQuery scrollbar." /> | ||
|
||
<link rel="stylesheet" href="css/website.css" type="text/css" media="screen"/> | ||
|
||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | ||
<script type="text/javascript" src="js/jquery.tinyscrollbar.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() | ||
{ | ||
var $scrollbar = $('#scrollbar1') | ||
, $overview = $scrollbar.find(".overview") | ||
, loadingData = false | ||
; | ||
|
||
$scrollbar.tinyscrollbar({thumbSize : 20}); | ||
|
||
var scrollbarData = $scrollbar.data("plugin_tinyscrollbar") | ||
|
||
$scrollbar.bind("move", function() | ||
{ | ||
// The threshold will enable us to start loading the text before we reach the end. | ||
// | ||
var threshold = 0.9 | ||
, positionCurrent = scrollbarData.contentPosition + scrollbarData.viewportSize | ||
, positionEnd = scrollbarData.contentSize * threshold | ||
; | ||
|
||
// Check if have reached the "end" and that we arent allready in the process of loading new data. | ||
// | ||
if(!loadingData && positionCurrent >= positionEnd) | ||
{ | ||
loadingData = true; | ||
|
||
$.getJSON("json/data.json", function(data) | ||
{ | ||
loadingData = false; | ||
|
||
$overview.append(data.text) | ||
|
||
scrollbarData.update("relative"); | ||
}); | ||
} | ||
}); | ||
}); | ||
</script> | ||
|
||
</head> | ||
<body> | ||
<div id="scrollbar1"> | ||
<div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div> | ||
<div class="viewport"> | ||
<div class="overview"> | ||
<h3>Magnis dis parturient montes</h3> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut vitae velit at velit pretium sodales. Maecenas egestas imperdiet mauris, vel elementum turpis iaculis eu. Duis egestas augue quis ante ornare eu tincidunt magna interdum. Vestibulum posuere risus non ipsum sollicitudin quis viverra ante feugiat. Pellentesque non faucibus lorem. Nunc tincidunt diam nec risus ornare quis porttitor enim pretium. Ut adipiscing tempor massa, a ullamcorper massa bibendum at. Suspendisse potenti. In vestibulum enim orci, nec consequat turpis. Suspendisse sit amet tellus a quam volutpat porta. Mauris ornare augue ut diam tincidunt elementum. Vivamus commodo dapibus est, a gravida lorem pharetra eu. Maecenas ultrices cursus tellus sed congue. Cras nec nulla erat.</p> | ||
|
||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque eget mauris libero. Nulla sit amet felis in sem posuere laoreet ut quis elit. Aenean mauris massa, pretium non bibendum eget, elementum sed nibh. Nulla ac felis et purus adipiscing rutrum. Pellentesque a bibendum sapien. Vivamus erat quam, gravida sed ultricies ac, scelerisque sed velit. Integer mollis urna sit amet ligula aliquam ac sodales arcu euismod. Fusce fermentum augue in nulla cursus non fermentum lorem semper. Quisque eu auctor lacus. Donec justo justo, mollis vel tempor vitae, consequat eget velit.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.