Hello everyone, there is a responsive site, the question arose of how to properly implement the transition to the main version of the site for mobile devices. After all, for a mobile device, everything adapts through the media classes and bootstrap itself.

Closed due to the fact that it is necessary to reformulate the question so that it is possible to give an objectively correct answer to the participants of the Air , AK , Viktor Tomilov , cheops , 0xdb 9 Feb '18 at 21:50 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

    3 answers 3

    In general, to switch from the mobile version to the full version and back, you need to have these two separate versions - mobile and full. An adaptive site is one version that is simply displayed differently on different screens.

    But you can substitute the "crutch" - on click, change the contents of the viewport meta tag (namely, from initial-scale = 1 to initial-scale = 0 and back):

    <button id="full">Полная версия</button> <button id="mobile">Мобильная версия</button> <script> $('#full').click(function(){ $('[name="viewport"]').attr('content', 'width=device-width, initial-scale=0, user-scalable=no'); }); $('#mobile').click(function(){ $('[name="viewport"]').attr('content', 'width=device-width, initial-scale=1'); }); </script> 
    • Thank you very much! I agree this is a crutch. - Alisher-ea

    The only thing that can be done in this case is to play with the values ​​of the viewport:

     <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> 

      With the help of javascript, you can fix the width of the site (if bootstrap is the width of the container) for example at 1200 px

      An example using jQuery:

       $(".container").css("width",1200); 
      • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - From the queue of checks - Sublihim
      • @Sublihim, And what should be the answer? It is not always necessary to give the code when it comes to elementary things. I understood the user's question, I do not need to clarify anything, and I think he understood my answer. - Abmin
      • In addition to the topstarter, people come here to search for an item. Add at least an example of the code, or something. Give a more detailed answer. - Sublihim