Friday, April 12, 2019

How To Hide or Show HTML using isMobileRequest?

0
The Conditional expression has the following syntax which works on a Boolean Logic:
<b:if cond='data:blog.isMobileRequest == "true"'>
HTML To Show Only in Mobile Devices
</b:if>
The content inside the conditional expression above will load only in Mobile devices where the condition has value true due to the parameter ?m=1 where 1 means True.
If in case you wish to display content only on desktop devices then you will reverse the logic in this order:
<b:if cond='data:blog.isMobileRequest == "false"'>
HTML To Show Only in Desktop Devices
</b:if>
As simple as that. Note that this condition works irrespective of whether or not you have enabled or disabled the default Blogger Mobile template. You can use it in both cases.
Author Image

About Sushil
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design

No comments: