The airplane animation block (he flies from side to side - forever).
Block container can be collapsed and expanded using jquery:
onclick = "$('.wrap').slideToggle('normal'); return false;"
So, if you collapse and expand the block, the animation stops, how can I fix it?
Emulation for my question: http://learn.javascript.ru/play/eEkfi
After the .knopka
is pressed I think you need to call go();
again:
zminu HTML
<div class="knopka">button minimize/maximize</div>
i jQuery
$('.knopka').on('click', function () {
$('.wrap').slideToggle('normal', function () {
// This is a callback function
// put code here that you need to execute after sliding is finished
go();
});
return false;
});
It's not perfect but I think you will get the idea.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.