12345678910111213141516171819202122232425262728293031323334353637 |
- /* AutoDoc Javascript */
-
- var conf = {
- "default_hash": "home"
- };
-
-
- $(document).ready(function() {
- change_page();
- });
-
- $(window).bind('hashchange', function() {
- change_page();
- });
-
- function change_page() {
- var hash = document.location.hash.substr(1) || conf.default_hash;
-
- if ( ! $("#autodoc_tab_"+hash).length ) {
- hash = conf.default_hash;
- }
-
- /* change menu highlights and content visibility */
- $('#autodoc_navbar').find("a").each(function(id, obj) {
- var curhash = $(obj).attr('href').substr(1);
- if ( curhash == hash ) {
- console.log("add " + curhash);
- $(obj).parent().addClass('active');
- $('#autodoc_tab_'+curhash).removeClass('d-none');
- }
- else {
- console.log("remove " + curhash);
- $(obj).parent().removeClass('active');
- $('#autodoc_tab_'+curhash).addClass('d-none');
- }
- });
- }
|