Big shout out to storbo726 on youtube for asking how to add admob onto a jQuery Mobile app! Sure you need to be able to make money on your web app or mobile website. So in this quick screen cast we are going to show you how to ad admob to your content area within your jQuery Mobile web app.
Related posts:











Awesomely easy!! thank you!!
BTW.. what’s the iPhone simulator you’re running? Might it be available for the mac?
Yes it is available on the mac. It’s actually xcode’s simulator from developer.apple.com. Let me know if I can help in any way!
Thanks,
Hi, I’ve been succesful at adding AdMob ads on my front page (Go to my homepage with a smartphone and it will redirect you). However, if I add the AdMob ads on a second page it doesn’t show anymore. I think it’s due to the Ajax of jQuery Mobile. AdMob has some tip that may work, but I was not able to make it work (See: iUI section: http://developer.admob.com/wiki/IPhone). Anyways, have you guys figured out how to integrate AdMob ads on all pages of a jQuery Mobile App? I’m trying to place them in the persistent footer. Thanks!
Nick is right. The technique on your video does not work for jQuery Mobile. You need to either take this video down or redo it.
To make admob work, you need to use Admob’s manual mode and invoke the ad rendering on each pageshow event.
Here is what I used to make it work…
var admob_vars = {
pubid: ‘xxx’,
bgcolor: ‘FF9119′,
text: ‘FFFFFF’,
ama: false,
test: false,
manual_mode: true
};
var fnFoo = function(){
var ad = $(‘#admob_ad’,this)[0];
if (typeof ad != ‘undefined’) {
ad.innerHTML = ”;
_admob.fetchAd(ad);
}
$(‘div[data-role=page]‘).die(‘pageshow’, fnFoo);
};
$(‘div[data-role=page]‘).live(‘pageshow’, fnFoo);
Re: my previous post — it looks like the comment system stripped out all the html tags. There’s a div tag at the beginning, a script tag around the var admob_vars, the iadmob.js src next, then a final script tag around the fnFoo function and pageshow calls
Pete,
thanks for the tip. It seems promising, but it doesn’t quite work right. It breaks the layout of my app when using the back button. I went to your mobile site to get the correct code. It also breaks the layout of your app if you click on “About” and then hit the back button.
Nick,
Hello evrybody i have the same problem,this method does not work,
Anyone have the solution to add some AdMob pub into our jquerymobile website?
Have you tried the solution provided above? I plan on implementing it and re-doing this screen cast in the coming week.
When is the upcoming “working” version going to be posted?
When is the upcoming “working” version going to be posted?
I really want the working version for when have several page.
please
Sorry for the delay, I have neglected this topic but I’m working on it for you guys.
Good to know you don’t have forget it
Your work is great thanks again for your effort !
Check out the new screen cast at http://pnhd.tv/pXywQD
New screen cast is available at http://pnhd.tv/pXywQD
Hello i want to know the api available in admob how i can use that api in my php site and also i generated the script using smartphone web and put that code in my php file but i am can’t see the output