Immediately apologize for my English / Google translator.
Does not work.
https://jsfiddle.net/2gb0wmjp/ for example.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript">
$('.rbar').click(function() {
$('.rbar_info').slideToggle();
});
</script>
.rbar
{
background:#0f0;
height: 150px;
width: 45px;
right: 0px;
top: 20%;
position: fixed;
}
.rbar_info{
background:#f00;
height:400px;
width:300px;
right:50px;
top:20%;
display:none;
}
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>MR</title>
</head>
<body>
<div class="rbar"></div>
<div class="rbar_info"></div>
</body>
</html>
Please tell me why, in the example it works but in fact is not? Maybe the reason that the curves hands?
You have to wrap it on the $(document).ready(function() {});
like
$(document).ready(function() {
$('.rbar').click(function() {
$('.rbar_info').slideToggle();
});
});