I made a kind of accordion with three expanding div ( #a
, #b
, #c
) in the violin, but when I save it locally and open it in a browser, the transitions are no longer smooth. I noticed that after clicking #b
with the extension #a
. I have included HTML that references CSS and JavaScript code. What is the reason and how best to solve it?
<head>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="wrapper">
<div class="outer">
<div class="middle">
<div class="inner" id="a">1</div>
<div class="inner" id="b">2</div>
<div class="inner" id="c">3</div>
</div>
</div>
</div>
<script src="accordion.js"></script>
</body>
Here is the link to the script: http://jsfiddle.net/tJugd/3794/
It seems that this only happens when unpacking #a
and pressing #b
or #c
or #b
and #c
.
source
share