Jump to content

hansford

Members
  • Posts

    562
  • Joined

  • Last visited

  • Days Won

    4

hansford last won the day on November 29 2016

hansford had the most liked content!

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

hansford's Achievements

Member

Member (2/5)

16

Reputation

3

Community Answers

  1. Sure. Put the script which dynamically generates the banner in a div and just hide the div after it's clicked.
  2. You have 2 options to accomplish this. Using plain JavaScript or with jQuery (or other library). I'll post the JavaScript way. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Insert title here</title> </head> <body> <a id="banner" href="http://www.purple.com" target="_blank"><img src="banner.jpg" width="400" height="150"></a> <script type="text/javascript"> window.onload = function() { var el = document.getElementById('banner'); el.addEventListener("click",function() { this.style.display = "none"; }); }; </script> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.