N
N
New York Knicks2015-11-11 18:22:25
css
New York Knicks, 2015-11-11 18:22:25

How to make elements show and hide smoothly?

I use backbone.js for my project.
It makes sense for the user class to hide some elements.
For example, the toolbar.
It turns out that I render the entire template. Then I hide a certain element with $('.class').hide or display: block. And it's noticeable. It can be seen how when you go to the page, the element is there and then hidden, all this is very clumsy.
How can this be done without the user noticing?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Viktor, 2015-11-11
@master2016

fadeIn() fadeOut() work?

A
Alexander Zachinalov, 2015-11-11
@SanDiesel

pass the user model to the template and, by condition, do not draw the panel if the user is not an admin

K
Konstantin Kitmanov, 2015-11-11
@k12th

As an option, initially make the unnecessary hidden and only then show it.

R
Roman Makarov, 2015-12-08
@rmakarov

In a good way - to give different templates on the server. Or you change the render yourself. Conditions are implemented in many template engines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question