Cascading toggles
Cascading toggles
I figured out the toggle thing, starting with two pictures showing, clicking on one to hide the next. Code below. However, I want to start with one picture and click that to show the second. And then I want to be able to click the second to show a third and so on, ending with a link after clicking the last picture. How do I do this?
- <html>
- <head>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("button").click(function(){
-
- $("#test").toggle();
- });
- });
- </script>
- </head>
- <body>
-
- <button><img src="http://i103.photobucket.com/albums/m121/Goth128/Emo.jpg"></button>
- <img id="test" src="http://i141.photobucket.com/albums/r70/lizapizza_photos/henri_de_toulouse_lautrec.png">
- <div class="marked">
- <p>This is another small paragraph.</p>
- <div>
- </body>
- </html>