diff --git a/templates/mark1/js/scripts.js b/templates/mark1/js/scripts.js index 7511ca52..2f192322 100644 --- a/templates/mark1/js/scripts.js +++ b/templates/mark1/js/scripts.js @@ -1,11 +1,12 @@ $.featherlight.autoBind = false; $(document).ready(function(){ - $('article.docs').addClass('js'); + var docs = $('article.docs'); + docs.addClass('js'); - if ($('article.docs').hasClass("article")){ - var header = $('article.docs header').first(); - var navigation_headings = $('article.docs nav .navigation > h2'); + if (docs.hasClass("article")){ + var header = docs.find('header').first(); + var navigation_headings = docs.find('nav .navigation > h2'); var navigation_sections = navigation_headings.next('ul'); navigation_headings.click(function(){ $(this).addClass('selected').next('ul').slideDown(250); @@ -17,8 +18,8 @@ $(document).ready(function(){ $(this).attr('title', $(this).next().text()); }); - var nav = $('article.docs nav'); - var system_select = $('article.docs .system-select'); + var nav = docs.find('nav'); + var system_select = docs.find('.system-select'); var system_select_lin = system_select.find('.system-select-lin'); var system_select_mac = system_select.find('.system-select-mac'); var system_select_win = system_select.find('.system-select-win'); @@ -50,7 +51,7 @@ $(document).ready(function(){ }; var system_switch = function(control, scroll){ - var system_all = $('.system-lin, .system-mac, .system-win'); + var system_all = docs.find('.system-lin, .system-mac, .system-win'); var system_lin = system_all.filter('.system-lin'); var system_mac = system_all.filter('.system-mac'); var system_win = system_all.filter('.system-win'); @@ -151,5 +152,5 @@ $(document).ready(function(){ } } - $('article.docs figure > a:has(img)').featherlight({type: 'image', openSpeed: 150, closeSpeed: 150}); + docs.find('figure > a:has(img)').featherlight({type: 'image', openSpeed: 150, closeSpeed: 150}); }); diff --git a/templates/mark1/template.yaml b/templates/mark1/template.yaml index 5c47023c..8c0111d5 100644 --- a/templates/mark1/template.yaml +++ b/templates/mark1/template.yaml @@ -7,6 +7,6 @@ Document: document.html Footer: footer.html Redirect: redirect.html Fonts: fonts/opensans-bold-1.10.woff, fonts/opensans-bold-1.10.woff2, fonts/opensans-bolditalic-1.10.woff, fonts/opensans-bolditalic-1.10.woff2, fonts/opensans-italic-1.10.woff, fonts/opensans-italic-1.10.woff2, fonts/opensans-regular-1.10.woff, fonts/opensans-regular-1.10.woff2, fonts/ropasans-italic-1.002.ttf, fonts/ropasans-italic-1.002.woff, fonts/ropasans-italic-1.002.woff2, fonts/ropasans-regular-1.002.ttf, fonts/ropasans-regular-1.002.woff, fonts/ropasans-regular-1.002.woff2 -Scripts: js/vendor/jquery/jquery-2.2.3.min.js, js/vendor/js-cookie/js-cookie-2.1.1.min.js, js/vendor/featherlight/featherlight-1.4.0.min.js, js/scripts.js?2016090703 +Scripts: js/vendor/jquery/jquery-2.2.3.min.js, js/vendor/js-cookie/js-cookie-2.1.1.min.js, js/vendor/featherlight/featherlight-1.4.0.min.js, js/scripts.js?2016090704 Styles: css/vendor/featherlight/featherlight-1.4.0.min.css, css/fonts.css?2016051301, css/style.css?2016090702 ...