开发者

Dismiss tip, using tables or div?

开发者 https://www.devze.com 2023-03-08 03:34 出处:网络
I own a social network and would like the following to appear: http://i.stack.imgur.com/RmrE0.jpg Basically a small \'tip\' box that the 开发者_C百科user can dismiss by clicking the \'x\' link if th

I own a social network and would like the following to appear:

http://i.stack.imgur.com/RmrE0.jpg

Basically a small 'tip' box that the 开发者_C百科user can dismiss by clicking the 'x' link if they so wish.

I don't even know where to begin so any help would be greatly appreciated.


a simple div would be best .. just have it "show" on page load, and "hide" when it's clicked (javascript probably).. then I presume you would need cookies involved so if the user has dismissed it it won't appear again on every page load


Something simple Like this should do the trick:

HTML:

<div id="tipBox">
    Click <a href="guideURL.html" alt="Guide Link">Here</a> to see a guide to our website. <a href="#" onClick="hideDiv()"> [x] </a>
</div>

Java script:

<script type="text/javascript">
  function hideDiv()
  {
      var div = document.getElementById("tipBox");
  div.style.display = "none";
  }
</script>

Edit as required.

0

精彩评论

暂无评论...
验证码 换一张
取 消