A
A
Anton Kudaev2015-11-26 12:42:42
css
Anton Kudaev, 2015-11-26 12:42:42

How to hide div on certain pages?

There is a div block with the content class on all pages. I wanted to know if it is possible to hide this div on index.html, and display it on others.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Fedorov, 2015-11-26
@tonykudaev

in the head section of index.html, paste the following:

<style>
div.content {display: none !important}
</style>

D
display:block, 2015-11-26
@qork

jQuery

$(document).ready(function(){
    if (document.location.pathname == '/') {
       $('.container').addClass("container-hide");   
    }
});

css
.container-hide{
    display:none;
}

So?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question