MediaWiki:Common.js: Difference between revisions

From Rinchen Terdzö
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
Line 55: Line 55:
$(document).ready(function(){
$(document).ready(function(){
$('#wylie-tab-header').click(function() {
$('#wylie-tab-header').click(function() {
var listItemII = document.getElementById( "gyatsa-text" );
.each(
$(this).closest('#wylie-text').css('display','block');
var listItemII = document.getElementById( "gyatsa-text" );
$(this).removeClass('inactive-header');
$(this).closest('#wylie-text').css('display','block');
$(this).closest('#tibetan-text').css('display', 'none');
$(this).removeClass('inactive-header');
$(this).siblings('#tibetan-tab-header').addClass('inactive-header')
$(this).closest('#tibetan-text').css('display', 'none');
$(this).siblings('#tibetan-tab-header').addClass('inactive-header')
)
});
});
$('#tibetan-tab-header').click(function() {
$('#tibetan-tab-header').click(function() {

Revision as of 23:36, 5 October 2017

mw.loader.load( 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=EB+Garamond', 'text/css' );
mw.loader.load( 'https://use.fontawesome.com/bd289233d5.js' );


/*     RTZ Main Page Functions     */
$(document).ready(function(){
	$('#section-links').hover(
		function(){ $('#tsdlogo').addClass('hide') },
		function(){ $('#tsdlogo').removeClass('hide') }
	);
	$('#bios-trigger').click(function() {
		window.location = "Biographies";
	}).hover(
		function(){ $('#bios-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#bios-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
	$('#indexes-trigger').click(function() {
		window.location = "Indexes and Lineage Histories";
	}).hover(
		function(){ $('#indexes-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#indexes-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
	$('#maha-trigger').click(function() {
		window.location = "Mahayoga";
	}).hover(
		function(){ $('#maha-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#maha-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
	$('#anu-trigger').click(function() {
		window.location = "Anuyoga";
	}).hover(
		function(){ $('#anu-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#anu-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
	$('#ati-trigger').click(function() {
		window.location = "Atiyoga";
	}).hover(
		function(){ $('#ati-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#ati-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
	$('#sup-trigger').click(function() {
		window.location = "Supplementary Volumes";
	}).hover(
		function(){ $('#sup-back').css('z-index','999').addClass('animated fadeIn') },
		function(){ $('#sup-back').css('z-index','-999').removeClass('animated fadeIn') }
	);
});




/*     RTZ Biographies Page Functions     */

$(document).ready(function(){
	$('#wylie-tab-header').click(function() {
		.each(
			var listItemII = document.getElementById( "gyatsa-text" );
			$(this).closest('#wylie-text').css('display','block');
			$(this).removeClass('inactive-header');
			$(this).closest('#tibetan-text').css('display', 'none');
			$(this).siblings('#tibetan-tab-header').addClass('inactive-header')
		)
	});
	$('#tibetan-tab-header').click(function() {
		$(this).closest('#tibetan-text').css('display','block');
		$(this).removeClass('inactive-header');
		$(this).closest('#wylie-text').css('display', 'none');
		$(this).siblings('#wylie-tab-header').addClass('inactive-header')
	})
});