MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 6: Line 6:
   console.log('clickediclick');
   console.log('clickediclick');
  document.querySelectorAll('.team-list').forEach(function(el){
  document.querySelectorAll('.team-list').forEach(function(el){
  console.log(el);
  el.classList.toggle('show');
  el.classList.toggle('show');
  });
  });

Revision as of 20:37, 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(function(el){
	  		console.log(el);
	  		el.classList.toggle('show');
	  	});
	  });
  }
}());