Paul Smith Paul Smith - 2 years ago 134
Javascript Question

div display:none when 'word' is in the url

Tried googling around and I can't seem to be able to find if this is even possible. I use IPBoard and due to their most recent IPS4 update i can no longer just change the homepage i have to add divs to global layout meaning they appear on every page, which aren’t what I’m wanting.

So i was wondering if it would be possible via

to hide the div when url contains a word.

Example div would appear on home '’, but not on 'domain/hidden/'
If this isn’t possible then let me know and I’ll remove it, I’m reasonably new to
and jquery I only really know html/css so please be patient.

Answer Source
if(window.location.href.indexOf("my-word") !== -1) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download