Click here to Skip to main content
15,896,526 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
here is my code. I need to try another flipper at same line and another panel appear when i clicked on that flipper. any body help me

HTML
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script> 
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideToggle("slow");
  });
});
</script>
 
<style> 
#panel,#flip
{
padding:5px;
text-align:center;
background-color:#e5eecc;
border:solid 1px #c3c3c3;
}
#panel
{
padding:50px;
display:none;
}
</style>
</head>
<body>
 
<div id="flip">Click to slide the panel down or up</div>
<div id="panel">Hello world!</div>

</body>
</html>
Posted
Updated 25-May-14 23:39pm
v2
Comments
Kornfeld Eliyahu Peter 26-May-14 5:40am    
So?! What have you done so far?
vyas_pratik20 26-May-14 7:34am    
http://jsfiddle.net/sbRfb/
Amir khan gopang 26-May-14 16:43pm    
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
$(".flip1").click(function(){
$(".panel1").slideToggle("slow");
});
});
</script>

<style>
#panel,#flip
{
padding:5px;
text-align:center;
background-color:#e5eecc;
border:solid 1px #c3c3c3;
}
#flip{
float:left;
}
#panel
{
padding:50px;
display:none;
clear: both;
</style>
</head>
<body>

<div id="flip" class="flip">Click to slide the panel down or up</div>

<div id="flip" class="flip1">Click to slide the panel down or up</div>

<div id="panel" class="panel">Hello world!</div>


<div id="panel" class="panel1">Hello world 2!</div>


<div id="flip" class="flip1">Click to slide the panel down or up</div>

div id="panel" class="panel1">Hello world 3!</div>




</body>
</html>

My desire to work that code at All flipper and All panels call it in One function and one CSS. If possible then Help me .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900