Line 33: | Line 33: | ||
<button onclick="myFunction()">Try it</button> | <button onclick="myFunction()">Try it</button> | ||
− | April 2016 | + | <a class="showSingle" target="1">Div 1</a>April 2016 |
<p> | <p> | ||
− | <div id=" | + | <div id="div1" class="targetDiv"> |
<ul>Settlement of lab duties and position.</ul> | <ul>Settlement of lab duties and position.</ul> | ||
Line 57: | Line 57: | ||
<script> | <script> | ||
− | function | + | jQuery(function(){ |
− | + | jQuery('.showSingle').click(function(){ | |
− | + | jQuery('.targetDiv').hide(); | |
− | + | jQuery('#div'+$(this).attr('target')).show(); | |
− | + | }); | |
− | + | }); | |
− | + | ||
} | } | ||
</script> | </script> |
Revision as of 13:31, 10 August 2017