Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
139
rated 0 times [  145] [ 6]  / answers: 1 / hits: 80185  / 9 Years ago, fri, july 10, 2015, 12:00:00

How do i force desktop view on mobile devices with Bootstrap?


I have tried fixing the viewport width to 1024, but still it doesn't work me.


Any Advices?


More From » mobile

 Answers
7

Thanks All,



This code works for me:



var viewMode = getCookie(view-mode);
if(viewMode == desktop){
viewport.setAttribute('content', 'width=1024');
}else if (viewMode == mobile){
viewport.setAttribute('content', 'width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no');
}

[#65861] Wednesday, July 8, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arthur

Total Points: 729
Total Questions: 107
Total Answers: 109

Location: China
Member since Mon, Aug 22, 2022
2 Years ago
;