|
|
@ -8,7 +8,6 @@ $(function() { |
|
|
|
var pageHeight; |
|
|
|
var pageHeight; |
|
|
|
var contentPadding; |
|
|
|
var contentPadding; |
|
|
|
var footerHeight; |
|
|
|
var footerHeight; |
|
|
|
var noticeBanner; |
|
|
|
|
|
|
|
var componentsList; |
|
|
|
var componentsList; |
|
|
|
var navComponentLinks; |
|
|
|
var navComponentLinks; |
|
|
|
var contentSection; |
|
|
|
var contentSection; |
|
|
@ -24,7 +23,6 @@ $(function() { |
|
|
|
bod = $(document.body) |
|
|
|
bod = $(document.body) |
|
|
|
device = device || $('.device'); |
|
|
|
device = device || $('.device'); |
|
|
|
platformToggle = $('.platform-toggle'); |
|
|
|
platformToggle = $('.platform-toggle'); |
|
|
|
noticeBanner = $('.notice-banner'); |
|
|
|
|
|
|
|
navComponentLinks = $('.docs-nav'); |
|
|
|
navComponentLinks = $('.docs-nav'); |
|
|
|
componentsList = $('.components-list'); |
|
|
|
componentsList = $('.components-list'); |
|
|
|
componentLinks = $('.component-example a'); |
|
|
|
componentLinks = $('.component-example a'); |
|
|
@ -40,8 +38,6 @@ $(function() { |
|
|
|
device.initialTop = device.initialTop || device.offset().top; |
|
|
|
device.initialTop = device.initialTop || device.offset().top; |
|
|
|
device.dockingOffset = ($(window).height() - device.height())/2; |
|
|
|
device.dockingOffset = ($(window).height() - device.height())/2; |
|
|
|
|
|
|
|
|
|
|
|
console.log(device.dockingOffset); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle placment
|
|
|
|
// Toggle placment
|
|
|
|
toggleTop = platformToggle.offset().top; |
|
|
|
toggleTop = platformToggle.offset().top; |
|
|
|
toggleHeight = platformToggle.outerHeight(); |
|
|
|
toggleHeight = platformToggle.outerHeight(); |
|
|
@ -55,19 +51,15 @@ $(function() { |
|
|
|
var addEventListeners = function () { |
|
|
|
var addEventListeners = function () { |
|
|
|
eventListeners = true; |
|
|
|
eventListeners = true; |
|
|
|
|
|
|
|
|
|
|
|
noticeBanner.on('click', function () { |
|
|
|
|
|
|
|
$(this).hide(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
device.on('click', function (e) { |
|
|
|
device.on('click', function (e) { |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
navComponentLinks.click(function(e) { |
|
|
|
// navComponentLinks.click(function(e) {
|
|
|
|
e.stopPropagation(); |
|
|
|
// e.stopPropagation();
|
|
|
|
e.preventDefault(); |
|
|
|
// e.preventDefault();
|
|
|
|
componentsList.toggleClass('active'); |
|
|
|
// componentsList.toggleClass('active');
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
doc.on('click', function () { |
|
|
|
doc.on('click', function () { |
|
|
|
componentsList.removeClass('active'); |
|
|
|
componentsList.removeClass('active'); |
|
|
|