V
V
vis0r2016-01-27 20:28:09
css
vis0r, 2016-01-27 20:28:09

How to implement the "Show full version" button in the mobile version of responsive design?

There is an adaptive layout with media queries for different resolutions. It is required to show the full (Desktop) version of the site on button click. Please suggest possible ways to implement this functionality.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel O, 2016-01-27
@gans5131

I think it's worth using sessions.
The variable in the session will tell you whether to include responsive or desktop styles.
Those.
- there is a button "Full version"
- we press
- either with ajax or using a form we run a script that sculpts into the session variable we created that we are now desktop
- we reload the page
- the theme template should contain logic that checks the session variable, in which we write the state of the site and, depending on its value, gives the styles of the desktop or adaptive

N
Nikolay Evsyukov, 2018-01-31
@NikolasPushkin

I think one of the good options would be (provided that the styles are compiled into one file and huddled, or for example, the site is initially adaptive or for some other reason) will be reloading the page with changing the viewport meta tag and setting a fixed width for the body tag.

D
Dmitry, 2016-01-27
@DP-Studio

The easiest option is media queries in separate css, prepare 2 templates. in 1 to connect in another is not present. Click the button to switch to the option with not connected. Well, or render it through an ajax request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question