title: unable to call onclick event only at first page in phonegap
body: <p>I'm using cordova phonegap to make an android app. In the first page I'm trying to use input elements with a button:</p>
  
  <pre><code>$(document).ready(init());
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>document.addEventListener("deviceready", onDeviceReady, false);
  </code></pre>
  
  <p>Input element:</p>
  
  <pre><code>&lt;input type="button" id="task_btn" value="Button" /&gt;
  </code></pre>
  
  <p>Click event:</p>
  
  <pre><code>$("#download_btn").click(function() {
        console.log("index.html &gt;&gt; task button clicked");
  }
  </code></pre>
  
  <p>but it doesn't work; however, in the second page it works well.<br>
  Element IDs are defined correctlly.</p>
  
  <p>How to solve this problem?</p>
  
  <p>full code on html page :</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Home Page&lt;/title&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;link rel="stylesheet" href="js/jquery.mobile-1.3.1.min.css"&gt;
          &lt;script src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/jquery.mobile-1.3.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/cordova.js"&gt;&lt;/script&gt;
          &lt;style type="text/css"&gt;
              .main {
                  margin:0 auto;
                  width:100%;
                  height: 100%;
              }
              .button_main {
                  margin-left:1%;
                  width:20%;
                  height: 20%;
                  padding-top: 3%;
                  padding-bottom: 3%;
                  background-color: #fbe26f;
                  float: left;
              }
              .button_right {
                  margin-left: 8.75%;
                  margin-right: 8.75%;
                  width:20%;
                  height: 20%;
                  padding-top: 3%;
                  padding-bottom: 3%;
                  background-color: #fbe26f;
                  float: left;
              }
              .p_tag {
              margin-left: auto;
              margin-top: 5%;
              margin-right: auto;
              text-align: right;
              color: #194b7e;
              width:90%;
              font: italic bold 25px/30px Georgia, serif;
              background-color: #d0d0d0;
              word-wrap: break-word;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="main" align="center"&gt;
          &lt;div id="button_keeper" align="center"&gt;
              &lt;input type="button" id="contact_btn" value="Contact Us" /&gt;
              &lt;input type="button" id="product_btn" value="Product" /&gt;
              &lt;input type="button" id="about_btn" value="About Us" /&gt;
              &lt;!--&lt;a href="view.html?status=1" rel="external"&gt;&lt;div id="contact_btn" class="button_main"&gt;Contact Us&lt;/div&gt;&lt;/a&gt;--&gt;
              &lt;!--&lt;a href="view.html?status=2" rel="external"&gt;&lt;div id="product_btn" class="button_main"&gt;Product&lt;/div&gt;&lt;/a&gt;--&gt;
              &lt;!--&lt;a href="view.html?status=3" rel="external"&gt;&lt;div id="about_btn" class="button_main"&gt;About Us&lt;/div&gt;&lt;/a&gt;--&gt;
          &lt;/div&gt;
          &lt;p id="message" class="p_tag"&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript"&gt;
          $( document ).ready(function() {
  //                $('#message').append('Device Is Ready To Use');
              document.addEventListener("deviceready", onDeviceReady, false);
          });
          function onDeviceReady() {
  //                $('#message').append('&lt;br /&gt;'+'Device Is Ready To Use');
          }
          $("#contact_btn").click(function() {
              console.log("index.html &gt;&gt; button clicked : ");
              $('#message').append('Contact button clicked');
          });
          $("#about_btn").click(function() {
              console.log("index.html &gt;&gt; button clicked : ");
              $('#message').append('About button clicked');
          });
          $("#product_btn").click(function() {
              console.log("index.html &gt;&gt; button clicked : ");
              $('#message').append('Products button clicked');
          });
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>