Difference between revisions of "Template:Toc"

From The Official Visionaire Studio: Adventure Game Engine Wiki
m
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>Generates a floating Table of contents menu in a fixed position on the left hand side of the screen.</noinclude>
+
<noinclude>Generates a floating Table of contents menu in a fixed position on the left hand side of the screen.
 +
Javascript's ''were'' (they weren't loading correctly) in Template: MediaWiki:Common.js/ftoc.js and MediaWiki:Common.js/slimscroll.js
 +
</noinclude>
 
<includeonly>
 
<includeonly>
<html>
 
<script type="text/javascript" src="http://wiki.visionaire-tracker.net/extensions/jQuery-slimScroll-1.3.0/jquery.slimscroll.min.js"></script>
 
<script>
 
$(document).ready(function() {
 
 
$('.ftoc_content').slimScroll({
 
  color: '#5bc0de',
 
  height: '390',
 
  railVisible: true,
 
  railOpacity: 0.2,
 
  allowPageScroll: false,
 
  alwaysVisible: true,
 
  disableFadeOut: true
 
});
 
 
/*
 
$(".ftoc").hover(function() {
 
  $(".ftoc").stop().animate({left:'0px'}, 250, function() {
 
  $(".ftoc_content").stop().fadeIn("slow");
 
  });
 
}, function() {
 
  $(".ftoc_content").stop().fadeOut("fast", function() {
 
  $(".ftoc").stop().animate({left:'-250px'}, 250);
 
  });
 
});
 
*/
 
$(".ftoc").hover(function() {
 
$(".ftoc").stop().animate({left:'0px'}, 250, function() {
 
$(".ftoc_content").stop().animate({left:'5px'}, 500);
 
  });
 
}, function() {
 
$(".ftoc").stop().animate({left:'-250px'}, 250);
 
$(".ftoc_content").stop().animate({left:'-500px'}, 250);
 
});
 
 
var array = [ "/wiki/", "_(日本語)", "_(正體中文)", "_(한국어)", "_(Dansk)", "_(Deutsch)", "_( Español)", "_(Français)", "_(Italiano)", "_(Nederlands)", "_(Polski)", "_(Português)", "_(Svenska)", "_(Русский)" ];
 
var string = window.location.pathname;
 
string = string.replace(new RegExp(array.join("|"), "g"), "");
 
$('.xxx').text({{BASEPAGENAME}});
 
 
});
 
 
</script>
 
</html>
 
{{i18n|<span class="xxx">x</span>}}
 
 
<div class="ftoc"><div class="ftoc_content">__TOC__</div></div>
 
<div class="ftoc"><div class="ftoc_content">__TOC__</div></div>
 
</includeonly>
 
</includeonly>

Revision as of 22:47, 9 May 2016

Generates a floating Table of contents menu in a fixed position on the left hand side of the screen. Javascript's were (they weren't loading correctly) in Template: MediaWiki:Common.js/ftoc.js and MediaWiki:Common.js/slimscroll.js