M
M
mal1k2020-05-09 03:24:10
JavaScript
mal1k, 2020-05-09 03:24:10

How to make smooth animation in js?

There is a table in a table. (spoiler alert) and her first outing is very rough. It just appears, although the animation works fine after that. How can I make the first "animation" when entering the site and clicking it also be smooth?

Here is an example of my code.
jsfiddle.net/ny0ht7cd/52

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-05-09
@mal1k

.spoiler_block div {
  display: none;
}

$('.spoiler_title').click(function() {
  $('.spoiler_block div').slideToggle(250);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question