Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.
I have a question about the article 3 Tactics For Dealing With Ad-Block Users On Your Site. I have now implemented the pastebin JavaScript to my website. I have changed div=id to div=class and accordingly changed #myAdContainer to .myAdContainer. I have inserted the JavaScript into the header of my site and have inbound 1 of my ads with the div class=".myAdContainer">
I then tried to disable AdBlock and enable it, which should be redirecting me to the URL I have written in the JavaScript - in this case the URL is http://disney.com/ . I don't know why it is not working for me. Can you please help me? All help would be appreciated :)
Kind regards
Simon
2014-04-24 19:54:35
First: make it an ID, not a class. There's a reason it's like that - there can be only one named ID element. You should be able to surround your ad code with a specific ID, and just check one (perhaps you have more than one ad unit with the class, that's no good). Second: the script requires jQuery, and though most modern themes will include it, it's not certain. The snippet is also written in jquery "compatibility" mode - this is really designed for wordpress, so if you have a non-wordpress site and are sure you have included jQuery, try changing all instances of "jQuery" to "$". If you've tried both those, paste your URL here and I'll check the console.
2014-04-24 17:24:16
Fair point!
2014-04-23 22:21:15
Simon, you should really be asking this in the comments to the article itself. You're much more likely to get a response from people there.
2014-04-24 07:58:16
That article was originally published more than a year ago. The comments close after 180 days, so he cannot look for answers there.