MediaWiki:Timeless.js: Revizyonlar arasındaki fark

Fen Ansiklopedisi sitesinden
Değişiklik özeti yok
Etiket: Geri alındı
Değişiklik özeti yok
Etiket: Geri alındı
1. satır: 1. satır:
function openTab(tabName) {
$(function () {
   var i, x;
   // Show First Info
   x = document.getElementsByClassName("containerTab");
   $('.info').first().show().animate({
   for (i = 0; i < x.length; i++) {
    width: '40%'
     x[i].style.display = "none";
  });
  }
   // Show Info On Click
  document.getElementById(tabName).style.display = "block";
  $('.item').click(function () {
}
     $(this)
      .next().show().animate({ width: '40%' })
      .siblings('.info').animate({ width: 0 }, function() { $(this).hide() });
  });
});

01.22, 9 Ekim 2021 tarihindeki hâli

$(function () {
  // Show First Info
  $('.info').first().show().animate({ 
    width: '40%' 
  });
  // Show Info On Click
  $('.item').click(function () {
    $(this)
      .next().show().animate({ width: '40%' })
      .siblings('.info').animate({ width: 0 }, function() { $(this).hide() });
  });
});