UpdatePanel - Any ideas on how to avoid flickering in the user interface? - ASP.NET/Jquery

I have a pretty complicated interface. However, for this question, let's say there is an HTML table that defaults to UILayout1 (for example, the default mode). There is a button that the user can use to switch between the default mode and the preview mode (UILayout2)

When in preview mode there are several columns in the table that are invisible and there is a reordering of rows. I use JS (jquery) at boot time to check the mode and change it accordingly.

The table and toggle button are in UpdatePanels.

Functionally, everything works as expected. However, when the user switches between the default mode and the preview mode, or vice versa, there is such a short time interval in which the table is displayed by default, and then JS is launched to make changes.

This leads to poor user interface quality. Are there any creative ways to avoid this β€œflicker”?

+3
source share
3 answers

you can use the DIV or not use the update panel in your user interface generation using any else concept

+1
source

, , . , , jQuery onload . jQuerys $(document).ready(...) , javascript , .ready , javascript .

, , html , .. , $(document).ready(...);

javascript, , , .

javascript, .

100%, - , , , .

+1

, CSS? , , - JavaScript <head> HTML:

if (previewMode) {
    document.documentElement.className = 'preview';
}

, CSS, , HTML, class= " ", :

.preview table .defaultMode {
    display:none;
}

, , .

0

Source: https://habr.com/ru/post/1706137/


All Articles