MediaWiki:Example.js: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Miraheze>Adám Brudzewsky
(activate)
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
console.log("load test js?");
if($("#Longer_examples").length){
if($("#Longer_examples").length){
  $("#Longer_examples").onclick=Longer_examples.onclick=function(){alert('hi')};
console.log("yes: test js loaded");
$("#Longer_examples").onclick=function(){alert('hi')};
} else {
console.log("no: skipped test js");
}
}

Revision as of 11:17, 11 November 2019

console.log("load test js?");
if($("#Longer_examples").length){
	console.log("yes: test js loaded");
	$("#Longer_examples").onclick=function(){alert('hi')};
} else {
	console.log("no: skipped test js");
}