Difference between revisions of "MediaWiki:Common.js"

From Game Detectives Wiki
Jump to: navigation, search
(Replaced content with "console.log("Testing");")
Line 1: Line 1:
console.log("Testing");
+
  let cnt = 0;
 +
 
 +
  for(let n = 1; n < 100; n++) {
 +
    if(document.getElementById('tableRow' + n)) {
 +
      let row = document.getElementById('tableRow' + n);
 +
      row.addEventListener('click', function(){
 +
        console.log('working');
 +
        let dialog = 'dialog' + n;
 +
        $( function() {
 +
          $( '#' + dialog ).dialog();
 +
        } );
 +
      });

Revision as of 00:07, 15 August 2018

  let cnt = 0;

  for(let n = 1; n < 100; n++) {
    if(document.getElementById('tableRow' + n)) {
      let row = document.getElementById('tableRow' + n);
      row.addEventListener('click', function(){
        console.log('working');
        let dialog = 'dialog' + n;
        $( function() {
          $( '#' + dialog ).dialog();
        } );
      });