This is probaby really easy for you guys. Its a real hassle for me..
I want to add a new link next to all of my other links.
Could someone help me out? Please!? http://jsfiddle.net/Ahndm/
This is probaby really easy for you guys. Its a real hassle for me..
I want to add a new link next to all of my other links.
Could someone help me out? Please!? http://jsfiddle.net/Ahndm/
Instead of $("a")
in your loop, use this
to reference the current element, like this:
$(this).after("<span> <a href='" + newURL + "" + ID + "'>"+ newPlace + "</a></span>");
Here's the updated/working demo. Any time you're inside a .each()
you can use this
which is the current DOM element, using $("a")
selects all anchors, creating n^2
links.