How do I hide certain sections when the site is viewed on a mobile phone?
Is there a tag I can wrap sections to do this hiding?
Specifically:
- I want to hide footer widgets
- And certain sidebar widgets
How do I hide certain sections when the site is viewed on a mobile phone?
Is there a tag I can wrap sections to do this hiding?
Specifically:
- I want to hide footer widgets
- And certain sidebar widgets
Hey,
Angular adds a class to the body, which indicates the browser. Eg. for Iphones you can use following code to hide the footer area:
.safari #footer{
display: none;
}
I've not found a class which indicates mobile browsers but you can try to identify mobile browsers with following code.
if (jQuery(window).width() < 768){
jQuery('body').addClass("mobile");
}
I'd add the code to js/avia.js after following line:
jQuery(document).ready(function(){
Afterwards you should be able to use eg:
.mobile #footer{
display: none;
}
to hide the footer for all devices with small screen resolutions.
You must log in to post.