From 4a1016fd66ff921ff556d77bab423c2d5be1b92f Mon Sep 17 00:00:00 2001 From: connors Date: Sat, 11 Jan 2014 17:03:45 -0800 Subject: [PATCH] fixing up the phone placement --- docs-assets/js/docs.js | 8 ++++++++ lib/sass/docs.scss | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/docs-assets/js/docs.js b/docs-assets/js/docs.js index a7a01d6..71d132d 100644 --- a/docs-assets/js/docs.js +++ b/docs-assets/js/docs.js @@ -97,6 +97,14 @@ $(function() { iphone[0].setAttribute('style','') } + if(pageHeight - currentTop <= $('.platform-toggle') { + $('.platform-toggle').addClass('fixed'); + } else { + $('.platform-toggle').removeClass('fixed'); + } + + + // Injection of components into phone for (var l = contentSection.length; l--;) { if ((topCache[l] - currentTop) < windowHeight) { diff --git a/lib/sass/docs.scss b/lib/sass/docs.scss index fc8689f..b697793 100644 --- a/lib/sass/docs.scss +++ b/lib/sass/docs.scss @@ -158,6 +158,13 @@ h1, h2, h3, h4, h5, h6 { .platform-toggle { border-bottom: 1px solid #ddd; + &.fixed { + position: fixed; + top: 0; + left: 0; + right: 0; + } + .segmented-controller { max-width: 300px; margin: 8px auto;