How to annoy a little bit less to our visitors (And still show ads); well; making a little option to close; for example if you have a big adsense ad and you want the users to be able to erase the ad, here is the code: <script type="text/javascript"> function lclean() { document.getElementById("clean").innerHTML=""; document.getElementById("closebtn").innerHTML=""; } </script> <a onClick="clean()" id="closebtn">[CLOSE] </a> <div id="[B]clean[/B]"></div> Code (markup): Inside the DIV with ID Clean must be the content to be erased (the ad) You can look my example at www.jraw.net (click on any blog entry) Easy trick!
Example: Current Ad code [COLOR="DarkOrange"]<div>google_ad_client = "pub-9286332797346108"; /* 728x90, created 12/24/09 */ google_ad_slot = "4731117427"; google_ad_width = 728; google_ad_height = 90; r</div>[/COLOR] Code (markup): Modificated version with close button <script type="text/javascript"> function clean() { document.getElementById("clean").innerHTML=""; document.getElementById("closebtn").innerHTML=""; } </script> <a onClick="clean()" id="closebtn">[CLOSE] </a> <div id="clean"> [COLOR="DarkOrange"]<div>google_ad_client = "pub-9286332797346108"; /* 728x90, created 12/24/09 */ google_ad_slot = "4731117427"; google_ad_width = 728; google_ad_height = 90; r</div>[/COLOR] </div> Code (markup): Simple