I need help figuring the last bit of this out. I am trying to change a set of anchor elements in the form of <a href='#some link'> to be this form: <a href='some_link.html'>. I’m sure it’s something small I’m overlooking…below is a link as an example. Thanks!
I need help figuring the last bit of this out. I am trying to
Share
You’re iterating all
<a>elements, also the ones without anhrefattribute (i.e. the ones that have anameattribute instead). Usea[href]instead, which only selects<a>elements which actually have anhrefattribute to replace: http://jsfiddle.net/Dh8JM/25/.