I have <div id='cssmenu'> <ul> <li class= 'has-sub'><a href=store.aspx?id=dLYTWvt8EsHOq7Ps2wJA9A%3d%3d&digest=tNy7s/jOrynR4pvMVN6d6Q==><span>Armed Combat</span></a> <ul> <li class= 'has-sub'><a href=store.aspx?id=xEDEzZWDRkX8%2fbXoMX2pSQ%3d%3d&digest=tNy7s/jOrynR4pvMVN6d6Q==><span>Armed Combat 1-2</span></a><ul> <li class= 'active'><a href=store.aspx?id=TxlSRrnSZ6HDgj%2b2ZSxRhg%3d%3d&digest=tNy7s/jOrynR4pvMVN6d6Q==><span>Dance -1</span></a></li>
var reqid = "<%=Request["id"]%>";
$(function () { var str = $("#cssmenu").find('li').find('a').attr('href'); if ($(str).has(reqid)) { var str2 = $("#cssmenu").find('li').find('a').text(); $('#selectedmenuitem').html(str2); } })
<script type="text/javascript"> $(function () { var reqid = '<%=Request["id"]%>'; $("#cssmenu li a").each(function () { if ($(this).attr('href') == reqid) { $('#selectedmenuitem').html($(this).text()); } }); }) </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)