Выявить JS кнопки на слайдах не работают в режиме просмотра динамиков - PullRequest
0 голосов
/ 07 января 2020

При использовании раскрытия js я пытаюсь разместить кнопки и другие интерактивные элементы в своих слайдах, но для использования докладчиком, а не аудиторией. Я заметил, что когда я нажимаю на эти элементы в представлении докладчика, они не меняют представление для аудитории. Вот мой код:

<section>
  <div id="description">
    <p style="font-size:0.4em; text-align:justify;">This room is surrounded by a large duraplex window into space, outside of which the turrets of the Propriety's cannons can be seen. Behind the gunner's console stands a 15 foot circular plinth which is raised about half a foot from the deck. Several semicircular trays, arranged like a staircase stand on the south border of the plinth. They appear to contain spell components. To the opposite side of the plinth stands a large dish composed of hexagonal mirrors which trails a braid of large cables leading to the gunnery station.</p>
  </div>
  <button onclick="hideDescription()">hide</button>
  <script>
  function hideDescription() {
    var x = document.getElementById("description");
    if (x.style.display === "none") {
      x.style.display = "block";
    } else {
      x.style.display = "none";
    }
  }
  </script>
</section>

Если у кого-нибудь есть какие-либо советы по выполнению sh, я был бы признателен за это. Причина, по которой я не использую фрагменты для этого, заключается в том, что видимость этих элементов является условной - аудитория может видеть или не видеть элементы, которые я хочу показать, основываясь на моих решениях во время презентации.

...