开发者

jquery descendant selector issue

Code below select the <td> in which I'd like to select an <a> tag. How can I get the <a> ?

var refresh_link = $(this).parent().next().next()

Markup: when I click TEXT LINK A I want to select TEXT LINK B

<tr>
        <!-- product id -->
        <td>6005</td>

        <!-- product name -->
        <td>            
        Bla bla text<br />
        </td>

        <!-- monthly or daily price -->
        <td>
        270.0&euro; / mois
        </td>

        <!-- quantity + hidden field with the rowid + hidden field with original price at pageload -->
        <td>    
        TEXT LINK A
        </td>

        <!-- rental duration -->
        <td>
        bla
        </td>

        <!-- refresh / update cart quantity or duration -->

        <td><a id="1" href='#'>bla</a></td>

        <!-- total price calculated -->
        <td class='price_tot'>
        TEXT LINK B
        </td&g开发者_如何学Ct;

        <!-- send to trash -->
        <td><a href='#'>trash</a></td>

    </tr>


How about this:

 var refresh_link = $(this).parent().next().next().find('a');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜