jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.7k stars 2.41k forks source link

Feature Request: data-role="ad" #307

Closed Martinator closed 13 years ago

Martinator commented 13 years ago

In order to better support Mobile Ads, it might make sense to allow the developer to drop their Mobile Ad Code into a <div data-role="ad"></div> outside of the <div data-role="content"></div>

data-role="content" has a built in padding of 15px.

I know Google Adsense Mobile ads are rendered in an iframe that is 320px wide, which would not fit/format correctly inside a <div data-role="content"></div>

Keeping the ad in a separate <div data-role="ad"></div> could also possible allow other targeted features like fixed positioning and persistence.

(This could also lay the ground work for more interactive ads within a Mobile Web App without having to leave the Mobile Web App. Like what Apple is trying to do with iAd)

naugtur commented 13 years ago

You don't need jQuery Mobile to support a new role just to add a div outside the content. You can just add it and make it work with CSS

toddparker commented 13 years ago

I agree. I think this is something you can create on your own based on your ad needs.