Advertisement
Amanduhh7

Drop Down Menu

Nov 21st, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.90 KB | None | 0 0
  1.  
  2.  
  3. <!--IF USING AS IN A THEME ONLY COPY AND PASTE WHAT IS LISTED BETWEEN COMMENTS (best used in a page on your theme)-->
  4.  
  5. <!DOCTYPE html>
  6. <head>
  7.  
  8.  
  9. <title>{Title}</title>
  10.  
  11. <!--COPY AND PAST THE CODING BELOW INTO YOUR HEADER-->
  12. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  13.  
  14. <meta name="text:LinkOneURL" content="">
  15. <meta name="text:LinkOneAmount" content="">
  16. <meta name="text:LinkOne" content="">
  17.  
  18. <meta name="text:LinkTwoURL" content="">
  19. <meta name="text:LinkTwoAmount" content="">
  20. <meta name="text:LinkTwo" content="">
  21.  
  22. <meta name="text:LinkThreeURL" content="">
  23. <meta name="text:LinkThreeAmount" content="">
  24. <meta name="text:LinkThree" content="">
  25.  
  26. <meta name="text:LinkFourURL" content="">
  27. <meta name="text:LinkFourAmount" content="">
  28. <meta name="text:LinkFour" content="">
  29.  
  30. <meta name="text:LinkFiveURL" content="">
  31. <meta name="text:LinkFiveAmount" content="">
  32. <meta name="text:LinkFive" content="">
  33.  
  34. <meta name="text:LinkSixURL" content="">
  35. <meta name="text:LinkSixAmount" content="">
  36. <meta name="text:LinkSix" content="">
  37.  
  38. <meta name="text:LinkSevenURL" content="">
  39. <meta name="text:LinkSevenAmount" content="">
  40. <meta name="text:LinkSeven" content="">
  41.  
  42. <meta name="text:LinkEightURL" content="">
  43. <meta name="text:LinkEightAmount" content="">
  44. <meta name="text:LinkEight" content="">
  45.  
  46. <meta name="text:LinkNineAmount" content="">
  47. <meta name="text:LinkNineAmount" content="">
  48. <meta name="text:LinkNine" content="">
  49.  
  50. <meta name="text:LinkTenURL" content="">
  51. <meta name="text:LinkTenAmount" content="">
  52. <meta name="text:LinkTen" content="">
  53.  
  54. <meta name="text:LinkElevenURL" content="">
  55. <meta name="text:LinkElevenAmount" content="">
  56. <meta name="text:LinkEleven" content="">
  57.  
  58. <!--END CODING FOR HEADER-->
  59.  
  60. <style type="text/css">
  61.  
  62. <!--COPY AND PASTE THE CODE BELOW INTO YOUR CSS "STYLE TAGS"-->
  63.  
  64. body {
  65. font-size: 100%;
  66. }
  67. a {
  68. text-decoration: none;
  69. }
  70. ul,
  71. ul ul {
  72. margin: 0;
  73. padding: 0;
  74. list-style: none;
  75. }
  76. #wrapper {
  77. width: 220px;
  78. margin: 100px auto;
  79. font-size: 0.8125em;
  80. }
  81. .menu {
  82. width: auto;
  83. height: auto;
  84. -webkit-box-shadow: 0px 1px 3px 0px rgba(0,0,0,.73), 0px 0px 18px 0px rgba(0,0,0,.13);
  85. -moz-box-shadow: 0px 1px 3px 0px rgba(0,0,0,.73), 0px 0px 18px 0px rgba(0,0,0,.13);
  86. box-shadow: 0px 1px 3px 0px rgba(0,0,0,.73), 0px 0px 18px 0px rgba(0,0,0,.13);
  87. }
  88. .menu > li > a {
  89. background-color: #616975;
  90. background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(114, 122, 134)),to(rgb(80, 88, 100)));
  91. background-image: -webkit-linear-gradient(top, rgb(114, 122, 134), rgb(80, 88, 100));
  92. background-image: -moz-linear-gradient(top, rgb(114, 122, 134), rgb(80, 88, 100));
  93. background-image: -o-linear-gradient(top, rgb(114, 122, 134), rgb(80, 88, 100));
  94. background-image: -ms-linear-gradient(top, rgb(114, 122, 134), rgb(80, 88, 100));
  95. background-image: linear-gradient(top, rgb(114, 122, 134), rgb(80, 88, 100));
  96. filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#727a86', EndColorStr='#505864');
  97. border-bottom: 1px solid #33373d;
  98. -webkit-box-shadow: inset 0px 1px 0px 0px #878e98;
  99. -moz-box-shadow: inset 0px 1px 0px 0px #878e98;
  100. box-shadow: inset 0px 1px 0px 0px #878e98;
  101. width: 100%;
  102. height: 2.75em;
  103. line-height: 2.75em;
  104. text-indent: 2.75em;
  105. display: block;
  106. position: relative;
  107. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  108. font-weight: 600;
  109. color: #fff;
  110. text-shadow: 0px 1px 0px rgba(0,0,0,.5);
  111. }
  112.  
  113. .menu ul li a {
  114. background: #fff;
  115. border-bottom: 1px solid #efeff0;
  116. width: 100%;
  117. height: 2.75em;
  118. line-height: 2.75em;
  119. text-indent: 2.75em;
  120. display: block;
  121. position: relative;
  122. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  123. font-size: 0.923em;
  124. font-weight: 400;
  125. color: #878d95;
  126. }
  127. .menu ul li:last-child a {
  128. border-bottom: 1px solid #33373d;
  129. }
  130.  
  131. .menu > li > a:hover,
  132. .menu > li > a.active {
  133. background-color: #35afe3;
  134.  
  135. }
  136. .menu > li > a.active {
  137. border-bottom: 1px solid #1a638f;
  138. }
  139.  
  140. .menu > li > a:before {
  141. content: '';
  142. background-image:url(../images/sprite.png);
  143. background-repeat: no-repeat;
  144. font-size: 36px;
  145. height: 1em;
  146. width: 1em;
  147. position: absolute;
  148. left: 0;
  149. top: 50%;
  150. margin: -.5em 0 0 0;
  151. }
  152. .item1 > a:before {
  153. background-position: 0 0;
  154. }
  155. .item2 > a:before {
  156. background-position: -38px 0;
  157. }
  158. .item3 > a:before {
  159. background-position: 0 -38px;
  160. }
  161. .item4 > a:before {
  162. background-position: -38px -38px;
  163. }
  164. .item5 > a:before {
  165. background-position: -76px 0;
  166. }
  167.  
  168. .menu > li > a span {
  169. font-size: 0.857em;
  170. display: inline-block;
  171. position: absolute;
  172. right: 1em;
  173. top: 50%;
  174. background: #48515c;
  175. line-height: 1em;
  176. height: 1em;
  177. padding: .4em .6em;
  178. margin: -.8em 0 0 0;
  179. color: #fff;
  180. text-indent: 0;
  181. text-align: center;
  182. -webkit-border-radius: .769em;
  183. -moz-border-radius: .769em;
  184. border-radius: .769em;
  185. -webkit-box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, .26), 0px 1px 0px 0px rgba(255, 255, 255, .15);
  186. -moz-box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, .26), 0px 1px 0px 0px rgba(255, 255, 255, .15);
  187. box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, .26), 0px 1px 0px 0px rgba(255, 255, 255, .15);
  188. text-shadow: 0px 1px 0px rgba(0,0,0,.5);
  189. font-weight: 500;
  190. }
  191. .menu > li > a:hover span, .menu > li a.active span {
  192. background: #2173a1;
  193. }
  194.  
  195. .menu ul > li > a span {
  196. font-size: 0.857em;
  197. display: inline-block;
  198. position: absolute;
  199. right: 1em;
  200. top: 50%; /
  201. background-color: #fff;
  202. border: 1px solid #d0d0d3;
  203. line-height: 1em;
  204. height: 1em;
  205. padding: .4em .7em;
  206. margin: -.9em 0 0 0;
  207. color: #878d95;
  208. text-indent: 0;
  209. text-align: center;
  210. -webkit-border-radius: .769em;
  211. -moz-border-radius: 769em;
  212. border-radius: 769em;
  213. text-shadow: 0px 0px 0px rgba(255,255,255,.01));
  214. }
  215. .menu > li > ul li a:before {
  216. content: '▶';
  217. font-size: 8px;
  218. color: #bcbcbf;
  219. position: absolute;
  220. width: 1em;
  221. height: 1em;
  222. top: 0;
  223. left: -2.7em;
  224. }
  225.  
  226. .menu > li > ul li:hover a,
  227. .menu > li > ul li:hover a span,
  228. .menu > li > ul li:hover a:before {
  229. color: #ffffff;
  230. }
  231.  
  232. .menu ul li a:hover{
  233. background-color:#2173a1;
  234. }
  235.  
  236. <!--END CSS "STYLE" CODING-->
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. {CustomCSS}
  250.  
  251.  
  252. </style>
  253.  
  254.  
  255. </head>
  256.  
  257. <body>
  258.  
  259. <!--COPY AND PASTE THE CODING BELOW INTO YOUR HTML "BODY TAGS"-->
  260. <ul class="menu">
  261. <li class="item1"><a href="#">TUTORIALS<span><div id="result2"></div>
  262. <script>var a = "3" + 4 + 5;
  263. var b = {text:LinkOneAmount} + {text:LinkTwoAmount} + {text:LinkThreeAmount} + {text:LinkFourAmount} + {text:LinkFiveAmount} + {text:LinkSixAmount} + {text:LinkSevenAmount} + {text:LinkEightAmount} + {text:LinkNineAmount} + {text:LinkTenAmount} + {text:LinkElevenAmount};
  264.  
  265. $("#result1").html(a);
  266. $("#result2").html(b);
  267. </script>
  268. </span></a>
  269. <ul>
  270. <li><a href="{text:LinkOneURL}"><span>{text:LinkOneAmount}</span> {text:LinkOne} </a></li>
  271. <li> <a href="{text:LinkTwoURL}"><span>{text:LinkTwoAmount}</span>{text:LinkTwo} </a>
  272. <li> <a href="{text:LinkThreeURL}"><span>{text:LinkThreeAmount}</span>{text:LinkThree} </a></li>
  273. <li> <a href="{text:LinkFourURL}"><span>{text:LinkFourAmount}</span>{text:LinkFour} </a></li>
  274. <li> <a href="{text:LinkFiveURL}"><span>{text:LinkFiveAmount}</span>{text:LinkFive} </a></li>
  275. <li> <a href="{text:LinkSixnURL}"><span>{text:LinkSixAmount}</span>{text:LinkSix} </a></li>
  276. <li> <a href="{text:LinkSevenURL}"><span>{text:LinkSevenAmount}</span>{text:LinkSeven} </a></li>
  277. <li> <a href="{text:LinkEightURL}"><span>{text:LinkEightAmount}</span>{text:LinkEight} </a></li>
  278. <li> <a href="{text:LinkNineURL}"><span>{text:LinkNineAmount}</span>{text:LinkNine} </a></li>
  279. <li> <a href="{text:LinkTenURL}"><span>{text:LinkTenAmount}</span>{text:LinkTen} </a></li>
  280. <li> <a href="{text:LinkElevenURL}"><span>{text:LinkElevenAmount}</span>{text:LinkEleven} </a></li>
  281. <li> <a href="http://www.slapdashthemes.tumblr.com">Menu by: Slapdash Themes</a></li>
  282. </ul></li>
  283. </ul>
  284.  
  285. <script type="text/javascript">
  286. $(function() {
  287.  
  288. var menu_ul = $('.menu > li > ul'),
  289. menu_a = $('.menu > li > a');
  290.  
  291. menu_ul.hide();
  292.  
  293. menu_a.click(function(e) {
  294. e.preventDefault();
  295. if(!$(this).hasClass('active')) {
  296. menu_a.removeClass('active');
  297. menu_ul.filter(':visible').slideUp('normal');
  298. $(this).addClass('active').next().stop(true,true).slideDown('normal');
  299. } else {
  300. $(this).removeClass('active');
  301. $(this).next().stop(true,true).slideUp('normal');
  302. }
  303. });
  304.  
  305. });
  306. </script>
  307.  
  308. <!--END HTML "BODY" CODING-->
  309.  
  310. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement