This is what i have so far and it works fine:
$("a[id=terminalNode]").each(function() {
var _href = $(this).attr("href");
$(this).attr("href", _href + '/');
});
However, there are some instances where the value could have a “.aspx” in the href. Is there an easy way to filter these out of my each loop?
You can use
.indexOf()to check if a string contains a specific string. It is case-sensitive so.toLowerCase()might be a good idea: