title: Using jQuery with Google Chrome Apps not Chrome Extensions
body: <p>I need some help with including the jQuery lib in to a google chrome app.. I found some help for google extensions.. but I did not find any for google chrome apps. I think it has to done via manifest.json file... but I am having hard time getting it work...</p>
  
  <pre><code>my main.js file
  chrome.app.runtime.onLaunched.addListener(function() {
    chrome.app.window.create('index.html', {
      bounds: {
        width: 1200,
        height: 800
      }
    });
  });
  </code></pre>
  
  <p>my manifest.json file</p>
  
  <pre><code>    {
        "manifest_version": 2,
        "name": "eLiteLAB",
        "version": "1",
        "app": {
          "background": {
            "scripts": ["main.js"]
          }
        },
        "content_scripts": [
          {
            "css": ["css/jquery-ui-1.10.0.custom.css","css/index.css"],
            "js": ["./js/jquery-1.9.0.js","js/jquery-ui-1.10.0.custom.min.js","js/mainApp.js"]
          }
        ]
      }
  </code></pre>
  
  <p>my index file</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;elite Labs&lt;/title&gt;
  &lt;link href="css/index.css"  rel="stylesheet" type="text/css"&gt;
  &lt;link href="css/jquery-ui-1.10.0.custom.css" rel="stylesheet" type="text/css"&gt;
  &lt;script language="JavaScript" src="js/jquery-1.9.0.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script language="JavaScript" src="js/jquery-ui-1.10.0.custom.min.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
          $(document).ready(function(e) {
              $('#uoperatorselect').hide();
              $('#login').button().click(function(e) {
                 $.post('../scripts/login/controller.php',$('#loginform').serialize(),function(w){
                      if(w=='Fail'){
                          alert('Login Failed, Please contact your administrator @ 9848622259');
                      }else{
                          if(w=='Admin'){
                              $('#uloginscreen').hide();
                              $('#uoperatorselect').show("slide", { direction: "right" }, 1000);
                          }
                          else{
                              window.location.href = w;   
                          }
                      }
                  });
              });
              $('#back').button().click(function(e){
                  $.post('../scripts/login/controller.php',{lAction : 'Logout'}, function(e){
                      $('#uoperatorselect').hide();
                      $('#uloginscreen').show("slide", { direction: "left" }, 1000);
                  });
              });
              $('#go').button().click(function(a){
                  var cnt = $('input:checked').length;
                  if(cnt == 1){
                      if($('.udiv1 &gt; input:checkbox:checked').attr('redir') == 'N'){
                          alert('Redirection not setup for this option');
                      }else{
                          window.location.href = $('.udiv1 &gt; input:checkbox:checked').attr('redir');
                      }
                  }
                  if((cnt &gt; 1) || (cnt == 0)){
                      alert('You have to select one and only one option');
                      return false;
                  }
              });
           });
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div class="wrapper"&gt;
      &lt;div class="container" class=" ui-corner-all"&gt;
          &lt;div id="uholder" class=" ui-corner-all"&gt;
              &lt;div id="uloginscreen" class=" ui-corner-all"&gt;
                      &lt;div class=" ui-corner-all"&gt;
                          &lt;img id="elimg" src="images/elitelab.jpg" width="324" height="82" /&gt;
                          &lt;form id="loginform" enctype="multipart/form-data" action="../scripts/login/controller.php" method="post"&gt;
                              &lt;fieldset&gt;
                                  &lt;legend&gt;User Credentials&lt;/legend&gt;
                                  &lt;input type="hidden" name="lAction" value="Login"/&gt;
                                  &lt;label for="userid" class="ulabel"&gt;Userid&lt;/label&gt;
                                  &lt;input type="text" name="userid" id="usrid" class="uinput ui-corner-all"  /&gt;
                                  &lt;label for="password" class="ulabel"&gt;Password&lt;/label&gt;
                                  &lt;input type="password" name="password" id="pwd" class="uinput ui-corner-all" /&gt;
                                  &lt;a href="#" class="elButton" id="login"&gt;LogIn&lt;/a&gt;
                              &lt;/fieldset&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;
              &lt;/div&gt;
              &lt;div id="uoperatorselect"&gt;
                      &lt;div class=" ui-corner-all"&gt;
                          &lt;img id="elimg" src="images/elitelab.jpg" width="324" height="82" /&gt;
                          &lt;form id="redirectform" enctype="multipart/form-data" action="../scripts/login/controller.php" method="post"&gt;
                              &lt;fieldset&gt;
                                  &lt;legend&gt;Admin Selection&lt;/legend&gt;
                                  &lt;input type="hidden" name="lAction" value="Login" /&gt;
                                  &lt;div class="udiv1"&gt;
                                      &lt;input type="checkbox" name="operatorscreen" class="ucheckboxes" redir='../../users/operator/' /&gt;
                                      &lt;label for="operatorscreen" class="ucheckboxeslbls"&gt;Login as Operator&lt;/label&gt;
                                  &lt;/div&gt;
                                  &lt;div class="udiv1"&gt;
                                      &lt;input type="checkbox" name="operatorscreen1" class="ucheckboxes" redir='../../users/dealer/' /&gt;
                                      &lt;label for="operatorscreen1" class="ucheckboxeslbls"&gt;Login as Dealer&lt;/label&gt;
                                  &lt;/div&gt;
                                  &lt;div class="udiv1"&gt;
                                      &lt;input type="checkbox" name="operatorscreen2" class="ucheckboxes" redir='../../users/partner/' /&gt;
                                      &lt;label for="operatorscreen2" class="ucheckboxeslbls"&gt;Login as Partner&lt;/label&gt;
                                  &lt;/div&gt;
                                  &lt;div id="uoptiondiv"&gt;
                                      &lt;a href="#" class="elButton" id="back"&gt;Back&lt;/a&gt;
                                      &lt;a href="#" class="elButton" id="go"&gt;Go&lt;/a&gt;
                                 &lt;/div&gt;
                              &lt;/fieldset&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If you notice I have some jquery code and that is not executing...</p>