Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9792

    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

    #65871

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to hide footer widgets on mobile phones?’ is closed to new replies.