Anh chị cần làm menu giống như hình dưới đây:
Các code của nó (lưu ý cần include thư viện font awesome):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
<div class="peg100_prodcut_cat_sidebar"> <ul> <li> <div class="product_cat_level_2"><span>PEG Products by Functionality</span><span class=""><i class="fa fa-angle-down" aria-hidden="true"></i></span></div> <ul> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/acrylate-acrylamide-peg/"> Acrylate/Acrylamide PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/aldehyde-acetal-peg/"> Aldehyde / Acetal PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/alkyne-peg/"> Alkyne PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/amine-peg/"> Amine PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/azide-peg/"> Azide PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/biotin-peg/"> Biotin PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/boc-fmoc-protected-amine-peg/"> Boc/Fmoc protected amine PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/carboxylic-acid-peg/"> Carboxylic acid PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/caroxylic-acid-peg/"> Caroxylic acid PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/dbco-peg/"> DBCO PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/epoxide-glycidyl-ether-peg/"> Epoxide glycidyl ether PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/epoxide-peg/"> Epoxide PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/fluorescent-peg/"> Fluorescent PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/halide-chloride-bromide-peg/"> Halide (chloride, bromide) PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/hydrazide-peg/"> Hydrazide PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/hydroxyl-peg/"> Hydroxyl PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/lipid-dspe-cholesterol-peg/"> Lipid / DSPE / Cholesterol PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/maleimdie-peg/"> Maleimdie PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/maleimide-peg/"> Maleimide PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/nhs-esster-peg/"> NHS esster PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/nhs-ester-peg/"> NHS ester PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/nitrophenyl-carbonate-npc-peg/"> Nitrophenyl carbonate (NPC) PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/norbornene-peg/"> Norbornene PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/orthopyridyl-disulfide-opss-peg/"> Orthopyridyl disulfide (OPSS) PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/phosphate-peg/"> Phosphate PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/pyrene-peg/"> Pyrene PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/silane-peg/"> Silane PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/sulfonate-tosyl-mesyl-tresyl-peg/"> Sulfonate (tosyl, mesyl, tresyl) PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/tert-butyl-protected-carboxylate-peg/"> tert-Butyl protected carboxylate PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/thiol-peg/"> Thiol PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-functionality/vinylsulfone-peg/"> Vinylsulfone PEG </a> </li> </ul> </li> <li> <div class="product_cat_level_2"><span>PEG Products by Reactivity</span><span class=""><i class="fa fa-angle-down" aria-hidden="true"></i></span></div> <ul> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/amine-reactive-peg-derivatives/"> Amine reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/biotinylation-peg/"> Biotinylation PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/biotinylation-peg-derivatives/"> Biotinylation PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/cabonyl-reactive-peg-derivatives/"> Cabonyl reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/caboxyl-reactive-peg-derivatives/"> Caboxyl reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/carbon-nanotube-cnt-graphene-binding-peg-derivatives/"> Carbon nanotube CNT graphene binding PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/carbonyl-reactive-peg-derivatives/"> Carbonyl reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/carboxyl-reactive-peg-derivatives/"> Carboxyl reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/click-chemistry-peg-derivatives/"> Click chemistry PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/dye-labeling-peg-derivatives/"> Dye labeling PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/hydroxyl-reactive-peg-derivatives/"> Hydroxyl reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/nhs-ester-reactive-peg/"> NHS Ester Reactive PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/polymerizable-peg-derivatives/"> Polymerizable PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/protein-n-terminal-reactive-peg-derivatives/"> Protein N-terminal reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/reversible-pegylation/"> Reversible PEGylation </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/self-assembling-peg-derivatives/"> Self-assembling PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/surface-reactive-peg-derivatives/"> Surface reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/thiol-reactive-peg-derivatives/"> Thiol reactive PEG derivatives </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-reactivity/thiol-ene-crosslinker-chemistry/"> Thiol-ene Crosslinker Chemistry </a> </li> </ul> </li> <li> <div class="product_cat_level_2"><span>PEG Products by Structure</span><span class="opened"><i class="fa fa-angle-up" aria-hidden="true"></i></span></div> <ul style=""> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/4-arm-peg/"> 4-Arm PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/8-arm-peg/"> 8-Arm PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/amphiphilic-surfactant-peg/"> Amphiphilic, surfactant PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/heterobifunctional-peg/"> Heterobifunctional PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/homobifunctional-peg/"> Homobifunctional PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/monodisperse-peg/"> Monodisperse PEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/mpeg/"> mPEG </a> </li> <li> <a href="http://localhost/peg100/product-category/peg-products/peg-products-by-structure/peg-raw-materials/"> PEG Raw Materials </a> </li> </ul> </li> </ul> </div> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<style> .peg100_prodcut_cat_sidebar ul { margin: 0; padding: 0; } .peg100_prodcut_cat_sidebar ul li { list-style: none; } .peg100_prodcut_cat_sidebar>ul>li>.product_cat_level_2 { position: relative; border: 1px solid #ddd; padding: 5px; font-size: 18px; margin-bottom: 10px; } .peg100_prodcut_cat_sidebar>ul>li>.product_cat_level_2>span:nth-of-type(2) { position: absolute; right: 5px; cursor: pointer; } .peg100_prodcut_cat_sidebar>ul>li>ul>li {list-style: disc;line-height: 35px;} .peg100_prodcut_cat_sidebar>ul>li>ul { padding-left: 14px; display: none; } .peg100_prodcut_cat_sidebar>ul>li:last-child>ul { display: block; } </style> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<script> jQuery(function($){ $(document).ready(function(e) { $(document).on('click','.peg100_prodcut_cat_sidebar>ul>li>.product_cat_level_2>span:nth-of-type(2)',function(e){ e.preventDefault(); console.log($(this).parent('li')); $(this).parent().parent().find('ul').toggle(); if($(this).hasClass('opened')){ $(this).removeClass('opened'); $(this).html('<i class="fa fa-angle-down" aria-hidden="true"></i>'); }else{ $(this).addClass('opened'); $(this).html('<i class="fa fa-angle-up" aria-hidden="true"></i>'); } }); }); }); </script> |
Mọi sự sao chép xin ghi rõ nguồn là fcwordpress.net
Chuyên trang về wordpress: hướng dẫn thiết kế theme, plugin, thủ thuật wordpress