Is there any Blogger (blogspot) not mobile conditional format - Stack Overflow
To be honest, the term isMobile is too broad and may not be able to enable you to deliver expected result for all screen sizes -- this could be the limitation of Blogger in handling mobile responsiveness at the moment. To make your javascript conditionally work like CSS @media query, use this example:
<script type="text/javascript"> if (window.matchMedia('(max-width: 950px)').matches) { // Do something for screen sizes not wider than 950px. } else { // Do something for screen sizes wider than 950px, // which is pretty much what you're looking for, // that is (Not isMobile) equivalent. } </script> For my case, I disabled Blogger mobile template entirely and apply the following approach:
- Put the existing
viewportmeta tag outside theisMobilecondition. - Use CSS
@mediaquery to detect various screen sizes. - Use the above javascript for various screen sizes.
Read full article from Is there any Blogger (blogspot) not mobile conditional format - Stack Overflow
No comments:
Post a Comment