Advertisement
firoze

Making unlimited dropdown menu set this code into template

Aug 4th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. // to make a unlimited dropdown menu first set the below code into your template
  2.  
  3. <script type="text/javascript">
  4. jQuery(function($) {
  5. if ($.browser.msie && $.browser.version.substr(0,1)<7)
  6. {
  7. $('li').has('ul').mouseover(function(){
  8. $(this).children('ul').css('visibility','visible');
  9. }).mouseout(function(){
  10. $(this).children('ul').css('visibility','hidden');
  11. })
  12. }
  13. });
  14. </script>
  15. <style type="text/css">
  16. #menu ul {
  17. margin: 20px 0 0 0;
  18. _margin: 0; /*IE6 only*/
  19. opacity: 0;
  20. visibility: hidden;
  21. position: absolute;
  22. top: 38px;
  23. left: 0;
  24. z-index: 1;
  25. transition: all .2s ease-in-out;
  26. }
  27.  
  28. #menu li:hover > ul {
  29. opacity: 1;
  30. visibility: visible;
  31. margin: 0;
  32. }
  33.  
  34. #menu ul ul {
  35. top: 0;
  36. left: 150px;
  37. margin: 0 0 0 20px;
  38. _margin: 0; /*IE6 only*/
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45. #menu ul li ul {
  46. display: none;
  47. position: absolute;
  48. top: 29px;
  49. left: 0px;
  50. width: 150px;
  51. border: 1px solid #ccc;
  52. background: white;
  53. padding: 10px 0 0 0;
  54. }
  55.  
  56.  
  57.  
  58. #menu ul li ul li ul{
  59. background: white none repeat scroll 0 0;
  60. border: 1px solid #ccc;
  61. display: none;
  62. left: 150px;
  63. padding: 5px 0 0;
  64. position: absolute;
  65. top: -6px;
  66. width: 150px;
  67. }
  68.  
  69. #menu ul li ul li:hover ul{display: block;}
  70.  
  71.  
  72. #menu ul li ul li ul li ul{
  73. background: white none repeat scroll 0 0;
  74. border: 1px solid #ccc;
  75. display: none;
  76. left: 150px;
  77. padding: 5px 0 0;
  78. position: absolute;
  79. top: -6px;
  80. width: 150px;
  81. }
  82.  
  83. #menu ul li ul li ul li :hover ul{display: block;}
  84.  
  85. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement