I am trying to create a div (show) at top-right of the window which look like button. If the user click it then another div (form) should open up along with div (show) sliding down. So i used jquery slideToggle to Take Care of it. Now, if I click the div (show) it slideToggle div (form) but this two divs moves the third div (ano) down. That is this two affect other divs. I want this two div open up like a slider without affecting other I guess it should come at the top index. Here is the code
<html>
<head>
<script src="jquery.js"></script>
<style type="text/css">
.ano {
background-image:url('pic1.jpg');
position:
}
.show {
display: block;
margin-top: -10px;
background-image:url('button.png');
margin-left: 85%;
background-repeat:no-repeat;
}
.form {
display: block;
margin-top: -10px;
background-image:url('slider.png');
background-repeat:no-repeat;
margin-left: 85%;
}
body {
background-image:url('bg.jpg');
}
</style>
</head>
<body>
<div class="form">
Here are some content
</div>
<div class="show">
click me
</div>
<div class="ano">
different div
</div>
<script>
$(".show").click(function() {
$(".form").slideToggle();
});
</script>