title: how to check if you are on a certain page in jquery mobile
body: <p>I would like to know if it is possible if test which page you are on using jquery mobile and based on that page do whatever you need to. Here is the code I was using:</p>
  
  <pre><code>if(window.location.href == '#searchpage')
  {
      $("#searchtitle").val($(this).attr('titleResult'));
      $("#searchauthor").val($(this).attr('authorResult'));
      $("#searchpublisher").val($(this).attr('publisherResult'));
      $( "#searchedition" ).val($(this).attr('editionResult'));
      $("#searchDetailsSearchResults").empty();
  }
  </code></pre>
  
  <p>i.e. if I am on the page called searchpage then we would fill in text boxes with certain values. As such I'm struggling to find a way to determine if I am on a given page? How would I achieve this?</p>