i'm a javascript, jquery newbie :) how can i make a loop here on all the href within #rfr-topnav using javascript or jquery? thanks in advance.
<script type="text/javascript">
$(document).ready(function(){
var sel="#rfr-topnav a[href*='#root#']";
var href=$(sel).attr('href');
var rootUrl = $('#ctl00_RootUrlId').attr('value');
var newhref=rootUrl+href.substr(href.indexOf('#root#')+6);
$(sel).attr ('href',newhref);
});
</script>