/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery(document).ready(function(){ jQuery(".menu-item ul").hide(); jQuery(".current-menu-item").parents("ul, li") .map(function () { jQuery(this).show(); }); jQuery(".current-menu-item ul:first").show(); });