I
I
Igor Che2016-05-13 07:06:40
Drupal
Igor Che, 2016-05-13 07:06:40

How to make smooth updating of block submerged by Ajax?

I have a block, outwardly like a slider, in which only one element is loaded, and when scrolling with Ajax, the next one is loaded, and so on. The problem is that the content is of different arbitrary height, I would like to update the content smoothly.
I wanted to do it simply in CSS, add a transition, but firstly there is nothing to cling to, and secondly, there is nothing to change, actually. there are no two states between which it would be possible to make a transition.
Maybe it's worth making a jquery script that will determine the height of the block and prescribe it in css? Then it will be possible to smoothly change the height through css.
Getting into Ajax itself is not an option, because I use what is out of the box in Drupal, and changing something in this place is a whole thing.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrzej Wielski, 2016-05-13
@wielski

What's wrong with fadeIn / fadeOut?

S
seriogja, 2016-05-13
@seriogja

Hello!
According to the description, everything is very similar to a regular content slider. Perhaps you should implement your task through it. To do this, there is an excellent plugin owlcarousel /

  • For arbitrary height
  • To upload content

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question