How to draw to an element inside another element?
Those. there is a list li, inside each li there is a, from which I need to know the href parameter. Whether I address through $ (this).
<script type="text/javascript"> $('document').ready(function () { $('.navtabs li').each(function () { if ('http://site/' + $(this).attr('href') == window.location.href) { $(this).addClass('selected'); } }); }); </script>
or if, on the contrary, to set li referring through $ (this) to a?