Sha256: 0fe0251d2bc22af2aa145a53e25bac960d1ca8dfc238d602c6e271a87b5a5ce5

Contents?: true

Size: 1.72 KB

Versions: 1

Compression:

Stored size: 1.72 KB

Contents

:javascript
  function openTab(evt, tabId) {
    var i, tabcontent, tablinks;

    // Get all elements with class="tabcontent" and hide them
    tabcontent = document.getElementsByClassName("tabcontent");
    for (i = 0; i < tabcontent.length; i++) {
      tabcontent[i].style.display = "none";
    }

    // Get all elements with class="tablinks" and remove the class "active"
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i < tablinks.length; i++) {
      tablinks[i].className = tablinks[i].className.replace(" active", "");
    }

    // Show the current tab, and add an "active" class to the link that opened the tab
    document.getElementById(tabId).style.display = "block";
    evt.currentTarget.className += " active";
  }

  function openTabNd(evt, tabId) {
    var i, tabcontent, tablinks;

    // Get all elements with class="tabcontent" and hide them
    tabcontent = document.getElementsByClassName("tabcontent-nd");
    for (i = 0; i < tabcontent.length; i++) {
      tabcontent[i].style.display = "none";
    }

    // Get all elements with class="tablinks" and remove the class "active"
    tablinks = document.getElementsByClassName("tablinks-nd");
    for (i = 0; i < tablinks.length; i++) {
      tablinks[i].className = tablinks[i].className.replace(" active", "");
    }

    // Show the current tab, and add an "active" class to the link that opened the tab
    document.getElementById(tabId).style.display = "block";
    evt.currentTarget.className += " active";
  }

  
  // Get the element with id="defaultOpen" and click on it
  document.getElementById("default-open").click();
  var firstTablinkNd = document.getElementsByClassName("tablinks-nd")[0];
  if (firstTablinkNd) {
    firstTablinkNd.click();
  }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
golden_rose-1.0.0.pre lib/golden_rose/templates/assets/javascript/main.js.haml