javascript - How can I change the width of Twitter Bootstrap in mobile view to full view -


this question has answer here:

i'am new in web , css , jquery
know question not interested need ....
try make bootstrap base web site , know bootstrap responsive base , after search found framework can support non-responsive
after check bootstrap responsive found

/* large desktop */ @media (min-width: 1200px) { ... }  /* portrait tablet landscape , desktop */ @media (min-width: 768px) , (max-width: 979px) { ... }  /* landscape phone portrait tablet */ @media (max-width: 767px) { ... }  /* landscape phones , down */ @media (max-width: 480px) { ... } 

now how can change width of bootstrap in mobile view full view mean when load web site mobile have button such "desktop view". , l view , element large desktop view try after click on link doesn't work

$('body).modal({     backdrop: true,     keyboard: true }).css({     width: '1201',     'margin-left': function () {         return -($(this).width() / 2);     } }); 

can please me thanks.

using javascript switch between mobile , desktop layout going bit hacky. if want remember if user had selected view after close browser.

however can still achieve want doing along lines of this:

<!doctype html> <title>viewport</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script type='text/javascript' src='http://code.jquery.com/jquery-1.11.0.min.js'></script>  <button id="mobile">mobile view</button> <button id="desktop">desktop view</button>  <script type='text/javascript'>     $('#mobile').on('click', function() {         $('meta[name=viewport]').remove();         $('head').append('<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">');     });     $('#desktop').on('click', function() {         $('meta[name=viewport]').remove();         $('head').append('<meta name="viewport" content="width=1280, initial-scale=1.0">');     }); </script> 

i recommend follow cdonner's link in comments question , learn why solution not optimal you're trying achieve.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

django - CSRF verification failed. Request aborted. CSRF cookie not set -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -