K
K
Kaunov_ivan2015-07-02 16:44:11
JavaScript
Kaunov_ivan, 2015-07-02 16:44:11

How to make html appear smoothly?

On the click of a button, I change some of the content with But it changes too abruptly. how to force it to change within 1-2 seconds? $('.floor').hide().html(myHTML);

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander Pushkarev, 2018-10-20
@KenKup

JQuery not connected or connected after this script

S
Sergey Melnikov, 2015-07-02
@Kaunov_ivan

$('.floor').fadeOut(function() {
  $(this).html(myHTML);
}).fadeIn();

S
Sergey Nalomenko, 2015-07-02
@nalomenko

Use jQuery library's .fadeOut() method instead of .hide()

C
ColdSpirit, 2015-07-02
@ColdSpirit

jquery-docs.ru/Effects/hide/#speedcallback
helped?

V
veitmen, 2015-07-02
@veitmen

Push harder on him. I think I will agree. ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question