|
|
|
@ -16,26 +16,26 @@ $(function() {
|
|
|
|
|
var eventListeners; |
|
|
|
|
|
|
|
|
|
var initialize = function () { |
|
|
|
|
currentActive = 0; |
|
|
|
|
topCache = []; |
|
|
|
|
win = $(window); |
|
|
|
|
doc = $(document); |
|
|
|
|
bod = $(document.body) |
|
|
|
|
device = device || $('.device'); |
|
|
|
|
navComponentLinks = $('.docs-nav'); |
|
|
|
|
componentsList = $('.components-list'); |
|
|
|
|
componentLinks = $('.component-example a'); |
|
|
|
|
contentSection = $('.component'); |
|
|
|
|
topCache = contentSection.map(function () { return $(this).offset().top }) |
|
|
|
|
windowHeight = $(window).height() / 3 |
|
|
|
|
pageHeight = $(document).height(); |
|
|
|
|
contentPadding = parseInt($('.docs-content').css('padding-bottom')); |
|
|
|
|
footerHeight = $('.docs-footer').outerHeight(false); |
|
|
|
|
|
|
|
|
|
// Device placment
|
|
|
|
|
device.initialLeft = device.offset().left; |
|
|
|
|
device.initialTop = device.initialTop || device.offset().top; |
|
|
|
|
device.dockingOffset = ($(window).height() - device.height())/2; |
|
|
|
|
currentActive = 0; |
|
|
|
|
topCache = []; |
|
|
|
|
win = $(window); |
|
|
|
|
doc = $(document); |
|
|
|
|
bod = $(document.body) |
|
|
|
|
device = device || $('.device'); |
|
|
|
|
navComponentLinks = $('.docs-nav'); |
|
|
|
|
componentsList = $('.components-list'); |
|
|
|
|
componentLinks = $('.component-example a'); |
|
|
|
|
contentSection = $('.component'); |
|
|
|
|
topCache = contentSection.map(function () { return $(this).offset().top }) |
|
|
|
|
windowHeight = $(window).height() / 3 |
|
|
|
|
pageHeight = $(document).height(); |
|
|
|
|
contentPadding = parseInt($('.docs-content').css('padding-bottom')); |
|
|
|
|
footerHeight = $('.docs-footer').outerHeight(false); |
|
|
|
|
|
|
|
|
|
// Device placment
|
|
|
|
|
device.initialLeft = device.offset().left; |
|
|
|
|
device.initialTop = device.initialTop || device.offset().top; |
|
|
|
|
device.dockingOffset = ($(window).height() - device.height())/2; |
|
|
|
|
|
|
|
|
|
checkDesktopContent(); |
|
|
|
|
calculateScroll(); |
|
|
|
|