Browse Source

Fix mobile navbar toggle on desktop.

pull/498/head
XhmikosR 11 years ago
parent
commit
36f1f52a78
  1. 12
      docs/assets/js/docs.js
  2. 2
      docs/assets/js/docs.min.js

12
docs/assets/js/docs.js

@ -42,13 +42,8 @@ $(function() {
footerHeight = $('.docs-footer').outerHeight(false);
toolbarToggle = $('.js-docs-component-toolbar');
// exit if no device
if (!device.length) {
return;
}
// Device placement
if (windowWidth >= 768) {
if (windowWidth >= 768 && device.offset()) {
device.initialLeft = device.offset().left;
device.initialTop = device.initialTop || device.offset().top;
device.dockingOffset = ($(window).height() - device.height()) / 2;
@ -134,6 +129,11 @@ $(function() {
var contentSectionItem;
var currentTop = win.scrollTop();
// exit if no device
if (!device.length) {
return;
}
if ((device.initialTop - currentTop) <= device.dockingOffset) {
device[0].className = 'device device-fixed';
device.css({top: device.dockingOffset});

2
docs/assets/js/docs.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save