Alx Tioltisan Alx Tioltisan - 1 month ago 5
CSS Question

Making a <A href> to show picture? It is possible?

How can I make a DIV to appear only when it's clicked? I have which shows an div style, but unfortunatelly it shows when someone enters on the site too, I want to be show only when someone clicks on the a href. DEMO: http://vestigedayz.com/sys/adminexec/Test/ ( you can click Suspect folder )

<div id="info">
<img class="close-image" src="images/closeBg.png" />
<div class="arestat">
<img src="images/arestat.gif" alt="" ondragstart="return false;"/>
</div>
</div>


<script type="text/javascript">
$(function() {
$('#suspect').click(function() {
$('#info').show();
return false;
});
});
</script>

Answer

If you do not want the div to be visible initially, you should set its display: none

<div id="info" style="display: none;">
Comments