mattnish / rad Goto Github PK
View Code? Open in Web Editor NEW(Outdated) Responsive Ads - A jQuery plugin to make Google Adsense responsive using CSS3 transforms
License: MIT License
(Outdated) Responsive Ads - A jQuery plugin to make Google Adsense responsive using CSS3 transforms
License: MIT License
Strangely enough, bug #3 was only fixed in rad.min.js
but not rad.js
or maybe I am missing something?
I have implemented this code on my site for the top 728x90 banner:
Unfortunately, though the js file seems to be called correctly and all other code insertions seem to match your example page, I can't get the banner to resize.
Is it possible that the location of the banner within the theme is preventing the script from properly executing?
I'd love any feedback you may have on this.
The Leaderboard ad in the demo doesn't seem to be scaling for me.
Id given to
First off I would like to say thanks. I've been working on a responsive design for something for a few days now and was starting to integrate the ads in and was surprised to see Google had no method available to dealing with that. Your plugin works quite well.
I found one little problem. I'm using a highly modified version of Bootstrap and the span# tags have margins set. The plugin didn't take into account margins so the result was the ad was the width of the margin wider than the span# block. I made this modification:
Directly below line 62 (var pWidth = this.adParent.width();)
I added this:
pWidth -= (parseInt(this.adParent.parent().css('marginLeft').replace('px', '')) + parseInt(this.adParent.parent().css('marginRight').replace('px', '')));
This seems to have done the trick resulting in the ad being sized correctly.
Thanks once again for the plugin.
Stewart
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.