VT Exercise

https://drive.google.com/file/d/1euaKmIlEjWFTLeixE0xH8a1hvLqn7lRm/view?usp=sharing

Expand all

Back to top

Go to bottom

Expand all

Back to top

Go to bottom

Illegal HTML tag removed : var markdown = $(".markdown-body"); //smooth all hash trigger scrolling function smoothHashScroll() { var hashElements = $("a[href^='#']").toArray(); for (var i = 0; i < hashElements.length; i++) { var element = hashElements[i]; var $element = $(element); var hash = element.hash; if (hash) { $element.on('click', function (e) { // store hash var hash = this.hash; if ($(hash).length <= 0)="" return;="" prevent="" default anchor="" click="" behavior="" e.preventdefault();="" animate="" $('body,="" html').stop(true,="" true).animate({="" scrolltop:="" $(hash).offset().top="" },="" 100,="" "linear",="" function="" ()="" {="" when="" done,="" add="" hash="" to="" url="" (default="" behaviour)="" window.location.hash="hash;" });="" }="" smoothhashscroll();="" var="" toc="$('.ui-toc');" tocaffix="$('.ui-affix-toc');" tocdropdown="$('.ui-toc-dropdown');" tocdropdown.click(function="" (e)="" e.stoppropagation();="" enoughforaffixtoc="true;" generatescrollspy()="" $(document.body).scrollspy({="" target:="" ''="" $(document.body).scrollspy('refresh');="" if="" (enoughforaffixtoc)="" toc.hide();="" tocaffix.show();="" else="" tocaffix.hide();="" toc.show();="" $(document.body).scroll();="" windowresize()="" right="" paddingright="parseFloat(markdown.css('padding-right'));" -="" (markdown.offset().left="" +="" markdown.outerwidth()="" paddingright));="" toc.css('right',="" 'px');="" affix="" left="" newbool;="" rightmargin="(markdown.parent().outerWidth()" markdown.outerwidth())="" 2;="" for="" ipad="" or="" wider="" device="" (rightmargin="">= 133) { newbool = true; var affixLeftMargin = (tocAffix.outerWidth() - tocAffix.width()) / 2; var left = markdown.offset().left + markdown.outerWidth() - affixLeftMargin; tocAffix.css('left', left + 'px'); } else { newbool = false; } if (newbool != enoughForAffixToc) { enoughForAffixToc = newbool; generateScrollspy(); } } $(window).resize(function () { windowResize(); }); $(document).ready(function () { windowResize(); generateScrollspy(); }); //remove hash function removeHash() { window.location.hash = ''; } var backtotop = $('.back-to-top'); var gotobottom = $('.go-to-bottom'); backtotop.click(function (e) { e.preventDefault(); e.stopPropagation(); if (scrollToTop) scrollToTop(); removeHash(); }); gotobottom.click(function (e) { e.preventDefault(); e.stopPropagation(); if (scrollToBottom) scrollToBottom(); removeHash(); }); var toggle = $('.expand-toggle'); var tocExpand = false; checkExpandToggle(); toggle.click(function (e) { e.preventDefault(); e.stopPropagation(); tocExpand = !tocExpand; checkExpandToggle(); }) function checkExpandToggle () { var toc = $('.ui-toc-dropdown .toc'); var toggle = $('.expand-toggle'); if (!tocExpand) { toc.removeClass('expand'); toggle.text('Expand all'); } else { toc.addClass('expand'); toggle.text('Collapse all'); } } function scrollToTop() { $('body, html').stop(true, true).animate({ scrollTop: 0 }, 100, "linear"); } function scrollToBottom() { $('body, html').stop(true, true).animate({ scrollTop: $(document.body)[0].scrollHeight }, 100, "linear"); }

results matching ""

    No results matching ""