MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Matura Wiki
Zur Navigation springen Zur Suche springen
Zeile 15: Zeile 15:
 
     }
 
     }
 
   }
 
   }
 
 
<!-- Go to www.addthis.com/dashboard to customize your tools -->
 
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-55add56c21c63df9" async="async"></script>
 

Version vom 21. Juli 2015, 06:45 Uhr

function toggleSectionVisibility(fieldObj, id, txt1, txt2)
  {
  var e = document.getElementById('sectionblock'+id);
  if(txt1.search(/gif:/i) >= 0) txt1 = '<img src="'+txt1.replace(':', '">');
  if(txt2.search(/gif:/i) >= 0) txt2 = '<img src="'+txt2.replace(':', '">');
  if(fieldObj.innerHTML == txt1)
    {
    fieldObj.innerHTML = txt2;
    e.style.display = 'block';
    }
  else
    {
    fieldObj.innerHTML = txt1;
    e.style.display = 'none';
    }
  }