MediaWiki:Common.js

(відмінності між версіями)
Перейти до: навігація, пошук
Рядок 15: Рядок 15:
 
d = c.substring(0,c.length-1);
 
d = c.substring(0,c.length-1);
 
this.innerHTML = c.charCodeAt(c.length-1) === 9658 ? d+'\u25BC' : d+'\u25BA';
 
this.innerHTML = c.charCodeAt(c.length-1) === 9658 ? d+'\u25BC' : d+'\u25BA';
$('#arch').slideToggle('slow');
+
$('.'+$(this).attr('href').substring(1)).slideToggle();
 
return false;
 
return false;
 
});
 
});

Версія за 03:28, 12 листопада 2016

/* Any JavaScript here will be loaded for all users on every page load. */
if(mw.config.get('wgArticleId') == 1736) {
$( document ).ready( function() {
	var sli = $("#photoGroups .holder ul")[0];
	    sli.parentNode.style.height = "200px";
	$("#photoGroups p").each(function(i) {
 	    	$(this).mouseenter(function() {
			$(sli).stop();
			$(sli).animate({marginTop:"-"+(200+i*200)+"px"});
		});
	});
})};
$('.xpand a').click(function() {
	var c = this.firstChild.nodeValue,
	d = c.substring(0,c.length-1);
	this.innerHTML = c.charCodeAt(c.length-1) === 9658 ? d+'\u25BC' : d+'\u25BA';
	$('.'+$(this).attr('href').substring(1)).slideToggle();
	return false;
});
var ph = $('.photogal ul .thumbimage');
if (ph[0]) {
	ph[0].style.opacity = 0.66;
	var img = $('.photogal img')[0],
	caption = $('.photogal .thumbcaption')[0];
	img.removeAttribute('width');
	$('.photogal .thumbinner')[0].style.width = '';
	ph.each(function(i) {
		$(this).click(function() {
			var cpt = $('.thumbcaption',$('.photogal li')[i])[0];
			caption.innerHTML = cpt.innerText || cpt.textContent;
			img.src = this.src.replace('200px','800px');
			img.parentNode.href = this.parentNode.href;
			ph.each(function(j) { this.style.opacity = i === j ? 0.66 : 1 });
			return false;
		});
	});
}
Особисті інструменти
Навігація
education
societies
additional
Перегляди
Простори назв
Варіанти
Інструменти
Дії