Hello all
My friend suggested me this site, to try asking for help.
I'm new to web design and still i'm learning. I started with my personal website and now i need some help.
Here i will post my code and hope somebody can help me if that is even possible.
In this show/hide panel i would like when i click on one then that one will open and not all like in mine code. i tried few solutions but none solve my problem.
If someone can help i would be very grateful.
My friend suggested me this site, to try asking for help.
I'm new to web design and still i'm learning. I started with my personal website and now i need some help.
Here i will post my code and hope somebody can help me if that is even possible.
In this show/hide panel i would like when i click on one then that one will open and not all like in mine code. i tried few solutions but none solve my problem.
If someone can help i would be very grateful.
Code:
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".flip").click(function() {
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip {
margin: 0px;
padding: 5px;
text-align: center;
background: #4199ec;
border: solid 1px #fff;
}
div.panel {
widht: 50%;
height: 100px;
display: none;
}
</style>
<b>LINE 1</b>
<br>
<div class="panel">
<p>Here go text</p>
</div>
<br>
<p class="flip">Click here to Show/Hide Line 1</p>
</br>
<br>
<div align="center">
</div>
<b>LINE 2</b>
<br>
<div class="panel">
<p>Here go text</p>
</div>
<br>
<p class="flip">Click here to Show/Hide Line 2</p>
</br>
<br>
<br>
<div align="center">
</div>
<b>LINE 3</b>
<br>
<div class="panel">
<p>Here go text</p>
</div>
<br>
<p class="flip">Click here to Show/Hide Line 3</p>
<br>
<br>
<div align="center">
</div>
<b>LINE 4</b>
<br>
<div class="panel">
<p>Here go text</p>
</div>
<br>
<p class="flip">Click here to Show/Hide Line 4</p>
<br>
<br>
<div align="center">
</div>