Sigurjón Sigurjón - 5 months ago 45
CSS Question

Hide header/footer when url contains a certain parameter

I have a multi page webpage that has a header and footer on all pages,
and I am creating an app than can view certain areas of the page, but I dont want to show the footer and header when I am browsing through the app.

When I access the page through the app the app adds a parameter to the url. like this:

What is the most efficient way to this with java script and css?

        var url = window.location.href;
        if('inapp=true') === true){
            $('header').css('display', 'none');