|
|
Line 120: |
Line 120: |
| | | |
| | | |
− | <div class="wrapper wrapper1" id="wrapper">
| |
− | <p class="click-text">
| |
− | What does Marsellus Wallace not look like? <span class="arrow"></span>
| |
− | </p>
| |
− | <ul>
| |
− | <li>Black</li>
| |
− | <li>Bald</li>
| |
− | <li>A Bitch</li>
| |
− | </ul>
| |
− | </div>
| |
− |
| |
− | <div class="wrapper wrapper2" id="wrapper2">
| |
− | <p class="click-text">
| |
− | Malkovich malkovich? <span class="arrow"></span>
| |
− | </p>
| |
− | <ul>
| |
− | <li>Malkovich</li>
| |
− | <li>Malkovich</li>
| |
− | <li>Malkovich</li>
| |
− | </ul>
| |
− | </div>
| |
− |
| |
− | <div class="wrapper wrapper3" id="wrapper3">
| |
− | <p class="click-text">
| |
− | What is your favourite colour? <span class="arrow"></span>
| |
− | </p>
| |
− | <ul>
| |
− | <li>Blue</li>
| |
− | <li>Yellow</li>
| |
− | <li>Not Sure</li>
| |
− | </ul>
| |
− | </div>
| |
− |
| |
− | <script>
| |
− | document.getElementById('wrapper').onclick = function() {
| |
− |
| |
− | var className = ' ' + wrapper.className + ' ';
| |
− |
| |
− | this.className = ~className.indexOf(' active ') ?
| |
− | className.replace(' active ', ' ') :
| |
− | this.className + ' active';
| |
− | };
| |
− |
| |
− | document.getElementById('wrapper2').onclick = function() {
| |
− |
| |
− | var className = ' ' + wrapper2.className + ' ';
| |
− |
| |
− | this.className = ~className.indexOf(' active ') ?
| |
− | className.replace(' active ', ' ') :
| |
− | this.className + ' active';
| |
− | }
| |
− |
| |
− | document.getElementById('wrapper3').onclick = function() {
| |
− |
| |
− | var className = ' ' + wrapper3.className + ' ';
| |
− |
| |
− | this.className = ~className.indexOf(' active ') ?
| |
− | className.replace(' active ', ' ') :
| |
− | this.className + ' active';
| |
− | }
| |
− | </script>
| |
| </body> | | </body> |
| </html> | | </html> |