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


tried googling around , can't seem able find if possible. use ipboard , due recent ips4 update can no longer change homepage have add divs global layout meaning appear on every page, aren’t i’m wanting.

so wondering if possible via javascript of jquery hide div when url contains word.

example div appear on home 'domain.com/’, not on 'domain/hidden/' if isn’t possible let me know , i’ll remove it, i’m reasonably new javascript , jquery know html/css please patient.

if(window.location.href.indexof("my-word") !== -1) {     $("#my-div").hide() } 

Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -