title: Admob ads not showing in Jquery mobile app
body: <p>I'm trying to show ads in the app built with jquery mobile using Cordova. I'm using the Cordova-Admob-plus plugin to show ads. The plugin works fine when I use the onsen UI to build apps. But when I use Jquery Mobile the ads do not show.</p>
  <p>I don't know why the ads do not work when I use the Jquery Mobile framework to build the app. I think it has something to do with the javascript function which is not working in jquery Mobile. But I am not able to find out the actual problem.</p>
  <p>index.html file</p>
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;meta charset=&quot;UTF-8&quot;&gt;
  &lt;title&gt;App&lt;/title&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;user-scalable=no, width=device-width, initial-scale=1&quot;&gt; 
  &lt;meta name=&quot;robots&quot; content=&quot;noindex&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/cont.css&quot; /&gt;
  
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/jquery.mobile-1.4.5.min.css&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/jquery.mobile.theme-1.4.5.min.css&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/jquery.mobile.icons-1.4.5.min.css&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/onsenui.css&quot; /&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/onsen-css-components.min.css&quot; /&gt;
  &lt;script src=&quot;js/onsenui.min.js&quot;&gt;&lt;/script&gt;
  &lt;body&gt;
      
  
      &lt;div data-role=&quot;page&quot; id=&quot;homeIndex&quot; data-theme=&quot;a&quot;&gt;
          &lt;div data-role=&quot;header&quot; data-position=&quot;fixed&quot; data-theme=&quot;b&quot;&gt;
              &lt;h1&gt;SCHOLARSHIPS PAKISTAN&lt;/h1&gt;
          &lt;/div&gt;
  &lt;div class=&quot;app&quot;&gt;
  
      &lt;div id=&quot;deviceready&quot; class=&quot;blink&quot;&gt;
      &lt;/div&gt;
  &lt;/div&gt;
          &lt;div data-role=&quot;main&quot; data-role=&quot;content&quot; class=&quot;ui-content&quot; data-theme=&quot;a&quot;&gt;
  &lt;div class=&quot;app&quot;&gt;
  
      &lt;div id=&quot;deviceready&quot; class=&quot;blink&quot;&gt;
      &lt;/div&gt;
  &lt;/div&gt;
              &lt;a href=&quot;all.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;All Scholarships&lt;/a&gt;
              &lt;a href=&quot;merit.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Merit Based Scholarships&lt;/a&gt;
              &lt;a href=&quot;need.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Need Based Scholarships&lt;/a&gt;
      &lt;a href=&quot;hecl.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;HEC Local Scholarships&lt;/a&gt;
  &lt;a href=&quot;hecf.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;HEC Foreign Scholarships&lt;/a&gt;
  &lt;a href=&quot;peef.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;PEEF Scholarships&lt;/a&gt;
  &lt;a href=&quot;uni.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;University Scholarships&lt;/a&gt;
  &lt;a href=&quot;ugrad.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Undergraduate Scholarships&lt;/a&gt;
  &lt;a href=&quot;pgrad.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Post Gardauate Scholarships&lt;/a&gt;
  &lt;a href=&quot;it.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Engineering and IT Scholarships&lt;/a&gt;
  &lt;a href=&quot;med.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Medical Scholarships&lt;/a&gt;
  &lt;a href=&quot;biz.html&quot; data-role=&quot;button&quot; target=&quot;_self&quot;&gt;Business and Management Scholarships&lt;/a&gt;
      
                  
          &lt;/div&gt;
              
      &lt;/div&gt; 
  
      &lt;div data-role=&quot;page&quot; id=&quot;dialog&quot;&gt;
          &lt;div data-role=&quot;header&quot;&gt;
              &lt;h1 id=&quot;title&quot;&gt;Error&lt;/h1&gt;
          &lt;/div&gt;    
          &lt;div data-role=&quot;content&quot; id=&quot;content&quot;&gt;
          &lt;/div&gt;    
      &lt;/div&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.11.1.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.mobile-1.4.5.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/pinch-zoom.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/index.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/cordova.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/script.js&quot;&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>index.js file to show ads</p>
  <pre><code>'use strict'
  
  const app = {
    initialize() {
      document.addEventListener(
        'deviceready',
        this.onDeviceReady.bind(this),
        false,
      )
    },
  
    onDeviceReady() {
      this.receivedEvent('deviceready')
  
      this.showAds()
      this.checkIsLoaded()
      this.showAdsOld()
    },
  
    checkIsLoaded() {
      return admob.interstitial.isLoaded().then(result =&gt; {
        console.log(result)
        return result
      })
    },
  
    showAds() {
      
      const banner = new admob.BannerAd({
        adUnitId: 'ca-app-pub-5517499679401400/9842406242',
      })
      banner.show({ position: 'top' })
    },
  
    showAdsOld() {
     
      admob.interstitial
        .load({ id: 'ca-app-pub-5517499679401400/3866534140' })
        .then(() =&gt; admob.interstitial.show())
        .catch(console.log)
      
    },
  
    receivedEvent(id) {
      const parentElement = document.getElementById(id)
     
  
      console.log(`Received Event: ${id}`)
    },
  }
  
  app.initialize()
  </code></pre>