How do i get a href value from a link within a ul li list
Posted
by Akk
on Stack Overflow
See other posts from Stack Overflow
or by Akk
Published on 2010-06-13T15:15:12Z
Indexed on
2010/06/13
15:22 UTC
Read the original article
Hit count: 210
jQuery
I have an unordered list such as:
<ul id="cities">
<li><a href="/london/">London<a></li>
<li><a href="/new-york/">New York<a></li>
<li><a href="/paris/">Paris<a></li>
<ul>
using jquery how do i get the href value for "New York"? Only the anchor text value is known through the client so i would like to find the matching anchor text and extract the href.
Thanks
© Stack Overflow or respective owner