title: Redirect to another page with button or anchor in jQuery
body: <p>I have a different scenario, I want to redirect the page on click event to a link/page which contains # sign inside it. when I click on it, page remain on the same location, doesn't redirect, just replace the url in url box. I guess this is because # sign, when I replace with another link without # sign it works fine. I cannot remove this from page link, How do I redirect my page? I want to perform this in jQuery</p>
  
  <p><strong>edit:</strong> I don't want to reload my page</p>
  
  <p><strong>edit: not duplicate</strong> my link is separated by slashes "/" after and before # sign, not attached with page name</p>
  
  <p>link where I want to redirect </p>
  
  <pre><code>myApp/#/myPage.html
  </code></pre>
  
  <p>or just </p>
  
  <pre><code>#/myPage.html
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;button id="btn"&gt;Click&lt;/button&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;a id="btn" href="#"&gt;Click&lt;/a&gt;
  </code></pre>
  
  <p>I tried these..</p>
  
  <pre><code>&lt;button onClick="window.location='#/myPage.html';"&gt;Click&lt;/button&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$(document).on('click', '#btn', function (e) {
                      window.location.href = "myApp/#/myPage.html";  
  //window.location.href = "#/myPage.html";  // this too tried
               });
  </code></pre>
  
  <p>and these</p>
  
  <pre><code>window.location.href = "#/myPage.html";
  $(location).attr('href','#/myPage.html');
  </code></pre>