MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus e-vendo Wiki
Wechseln zu: Navigation, Suche
Zeile 2: Zeile 2:
  
  
 +
/* ==== accordion ==== */
 
$('.accordion').click(function(){
 
$('.accordion').click(function(){
 
  $(this).toggleClass('active').next('.panel').toggle(400);
 
  $(this).toggleClass('active').next('.panel').toggle(400);
 
});
 
});
  
 
 
 
 
 
/* ==== accordion ==== */
 
/*var acc = document.getElementsByClassName("accordion");
 
var panel = document.getElementsByClassName("panel");
 
var i;
 
 
for (i = 0; i < acc.length; i++) {
 
    acc[i].addEventListener("click", function() {
 
        this.classList.toggle("active");
 
 
        if (panel.style.display === "block") {
 
            panel.style.display = "none";
 
        } else {
 
            panel.style.display = "block";
 
        }
 
    });
 
}*/
 
  
  

Version vom 4. Juni 2018, 10:47 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */


/* ==== accordion ==== */
$('.accordion').click(function(){
 $(this).toggleClass('active').next('.panel').toggle(400);
});




/* ==== back to top-button ==== */
document.getElementById("btt").addEventListener("mouseenter",function(){ this.style.opacity="1.0", this.style.transition="0.5s" });
document.getElementById("btt").addEventListener("mouseleave",function(){ this.style.opacity="0.7", this.style.transition="0.5s" });