jquery selector question

Posted by FFish on Stack Overflow See other posts from Stack Overflow or by FFish
Published on 2010-05-06T07:22:56Z Indexed on 2010/05/06 7:28 UTC
Read the original article Hit count: 178

Filed under:
|

How can I select the src attr from the zoom span?

$(".gallery span.zoom").click(function() {
        // var imgPath = $(this).parent()......attr("src");
        // alert(imgPath);
    return false;
});

<ul class="gallery">
    <li id="li-1">
        <img src="002171/tn/001.jpg" alt="image" />
        <span class="delete"></span>
        <span class="zoom"></span>
        <em>hello world</em>
    </li>
</ul>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about selectors