MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
(function () {
console.log('Test siin siis?')
   var myElement = document.getElementById('team-toggle');
   var myElement = document.getElementById('mw-hello-world');
   if ( myElement ) {
   myElement.innerHTML = '<html>Hello World!!!</html>';
  myElement.addEventListener('click', function(){
  console.log('clickediclick');
  document.querySelectorAll('.team-list').forEach(el => {
  el.classList.toggle('show');
  });
  });
  }
}());
}());
console.log('Test?');

Revision as of 20:23, 11 September 2022

/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
  var myElement = document.getElementById('team-toggle');
  if ( myElement ) {
  	 myElement.addEventListener('click', function(){
  	 	console.log('clickediclick');
	  	document.querySelectorAll('.team-list').forEach(el => {
	  		el.classList.toggle('show');
	  	});
	  });
  }
}());