if url is AllItems.aspx then display none else AllItems.aspx?ID= display block
<p>the script below doesn't seem to work!</p>

<p>what's wrong with it?</p>

<p>here is what i try to do:</p>

<p>if url is <strong>AllItems.aspx</strong> then display:none else <strong>AllItems.aspx?ID=</strong> display:block</p>

<pre><code>var url = location.pathname;
  if (document.URL.indexOf("AllItems.aspx")&gt;= 0)  {
  jQuery("#logo").css("display","none");
  }
    else if (document.URL.indexOf("AllItems.aspx?ID=")&gt;= 0)  {
  jQuery("#logo").css("display","block");
  }
</code></pre>
