Posted By

fredaudet on 07/18/08


Tagged

show div javascript hide dynamic


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

codesmoker
cesgra


Show/Hide divs


 / Published in: HTML
 

  1. function showlayer(layer){
  2. var myLayer = document.getElementById(layer).style.display;
  3. if(myLayer=="none"){
  4. document.getElementById(layer).style.display="block";
  5. } else {
  6. document.getElementById(layer).style.display="none";
  7. }
  8. }
  9.  
  10.  
  11. /* FEED ICONS */
  12. .feed-yahoo{
  13. background:url(http://lh5.ggpht.com/antonio.lupetti/
  14. SGkbSeViXCI/AAAAAAAABq0/VKFk--P6rzg/s144/feed-yahoo.png) no-repeat;
  15. }
  16. .feed-newsgator{
  17. background:url(http://lh6.ggpht.com/antonio.lupetti/
  18. SGkZt949soI/AAAAAAAABqk/0K_xT635iWc/s144/feed-newsgator.png) no-repeat;
  19. }
  20. .feed-netvibes{
  21. background:url(http://lh6.ggpht.com/antonio.lupetti/
  22. SGkZsku-McI/AAAAAAAABqc/geaegB--2R0/s144/feed-netvibes.png) no-repeat;
  23. }
  24. .feed-bloglines{
  25. background:url(http://lh6.ggpht.com/antonio.lupetti/
  26. SGkZlVYv_1I/AAAAAAAABqM/HSGE2JRVGA8/s144/feed-bloglines.png) no-repeat;
  27. }
  28. .feed-xml{
  29. background:url(http://lh4.ggpht.com/antonio.lupetti/
  30. SGkZvPomXRI/AAAAAAAABqs/hXOtnqszlws/s144/feed-xml.png) no-repeat;
  31. }
  32. .feed-google{
  33. background:url(http://lh4.ggpht.com/antonio.lupetti/
  34. SGkZrkp8XCI/AAAAAAAABqU/Yp-Rb_1L98k/s144/feed-google.png) no-repeat;
  35. }
  36.  
  37.  
  38.  
  39. /* -------------------------------- */
  40. /* RSS MENU */
  41. #rss-menu{
  42. padding:10px;
  43. padding-top:0px;
  44. width:270px;
  45. border:solid 1px #CCCCCC;
  46. margin-top:10px;
  47. font-size:11px;
  48. position:absolute;
  49. background:#FFFFFF;
  50. margin-left: 446px; /* Change it with your custom distance from the left margin */
  51. top: 82px; /* Change it with your custom distance from top */
  52. z-index:2;
  53. }
  54.  
  55.  
  56.  
  57. <div id="rss-menu">
  58. <h2>Subscribe My Feeds</h2>
  59. <ul>
  60.  
  61. <li class="feed-xml">
  62. <a href="http://feeds.feedburner.com/Woork">Subscribe to RSS Feed</a&gt;
  63. </li>
  64.  
  65. <li class="feed-yahoo">
  66. <a href="http://add.my.yahoo.com/rss?url=http://feeds.feedburner.com/Woork">Add to My Yahoo</a>
  67. </li>
  68.  
  69. <li class="feed-newsgator">
  70. <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http://feeds.feedburner.com/Woork">Subscribe in NewsGator</a>
  71. </li>
  72.  
  73. <li class="feed-bloglines">
  74. <a href="http://www.bloglines.com/sub/ http://feeds.feedburner.com/Woork">Subscribe with Bloglines</a>
  75. </li>
  76.  
  77. <li class="feed-netvibes">
  78. <a href="http://www.netvibes.com/subscribe.php?url=http://feeds.feedburner.com/Woork">Add to Netvibes</a>
  79. </li>
  80.  
  81. <li class="feed-google">
  82. <a href="http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/Woork">Add to Google</a>
  83. </li>
  84.  
  85. </ul
  86. </div>

Report this snippet  

You need to login to post a comment.