开发者

Dismiss tip, using tables or div?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜