Since I need fadeIn () to return another element of the same size again, is there a way for fadeOut () of the element to keep space so that other elements do not repeat for a second of a second and then fadeIn () will return another element with the same size ?
Two methods come to mind:
My suggestion is that you end it with a div ... and set the same dimension in that div ...
Save the element that you want to fade inside the fixed <div style="display:block;width:300px;height:200px;"> , and then if you hide the element inside it, it will not affect the layout at all.
<div style="display:block;width:300px;height:200px;">
I made my own decision. Before running fadeOut, I ran this function:
/** * Keep the window height, to avoid user being thrown up (ie on fade out, remove, hide, etc) */ function keepHeight() { $('body').css('min-height', $(document).height()); }
So for example:
/** * Keep window height */ keepHeight(); /** * Fade out */ $('#someDiv').fadeOut();
Source: https://habr.com/ru/post/1313236/More articles:Is there a way to convert DocX, OpenXml or RTF to TextFlow in AS3? - flexFind out how many percent one line contains in another - stringWhy are my cron rake tasks called twice? - ruby-on-railsDoes AOL OpenID allow account authentication? - openidDefining test dependencies in CppUnit? - c ++Perl switch not working properly? - perlHow to group cases in a switch statement in Perl - stringJavax.xml.ws.Endpoint how does this relate to multiple connections? - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1313240/how-do-i-get-emacs-to-write-to-read-only-files-automatically&usg=ALkJrhjBYIGJy1jQ38bmNydxPrRr6d4JPgSVN Guide for Web Development - svnAll Articles