Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:timer-display [12.01.2016 09:21] – [Implementation] Update adminen:create:timer-display [12.01.2016 09:27] – [Show Other Content] admin
Line 46: Line 46:
  
 <code html> <code html>
-<div id="myObjective">+<div id="myObject">
 <h1>Heading</h1> <h1>Heading</h1>
 <p>You can read the secret text here.</p> <p>You can read the secret text here.</p>
Line 56: Line 56:
  
 <code html> <code html>
-<div id="myQuestion">+<div id="myObject">
 </code> </code>
  
Line 64: Line 64:
  
 **Tip:** This is not necessary for questions because they already have an HTML ID ([[:en:create:dynamic|Immediately Show Questions when a Certain Option is Selected]]). **Tip:** This is not necessary for questions because they already have an HTML ID ([[:en:create:dynamic|Immediately Show Questions when a Certain Option is Selected]]).
 +
 +The HTML/JavaScript code that takes care of hiding would look like this:
 +
 +<code html>
 +<script type="text/javascript">
 +<!--
 + 
 +// Funktion zum Einblenden der Knöpfe
 +function showContent() {
 +  var content = document.getElementById("myObject");
 +  // Den normalen Anzeigemodus wiederherstellen
 +  content.style.display = "";
 +}
 + 
 +// Nach dem Laden der Fragebogen-Seite das Script starten
 +SoSciTools.attachEvent(window, "load",
 +  function() {
 +    // Objekt heraussuchen
 +    var content = document.getElementById("myObject");
 +    // Ausblenden
 +    content.style.display = "none";
 +    // Den Timer starten
 +    window.setTimeout(showContent, 60000); // Nach 1 Min = 60.000 ms
 +  }
 +);
 + 
 +// -->
 +</script>
 +</code>
  
  
en/create/timer-display.txt · Last modified: 12.08.2022 19:26 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki