How do I select a sibling element using jQuery?

前端 未结 10 1609
渐次进展
渐次进展 2020-12-05 01:29

Can you help me with this jQuery selector?

$(\".auctiondiv .auctiondivleftcontainer .countdown\").each(function () {
    var newValue = parseInt($(this).text         


        
10条回答
  •  心在旅途
    2020-12-05 02:17

    Here is a link which is useful to learn about select a siblings element in Jquery.

    How do I select a sibling element using jQuery

    $("selector").nextAll(); 
    $("selector").prev(); 
    

    you can also find an element using Jquery selector

    $("h2").siblings('table').find('tr'); 
    

    For more information, refer this link next(), nextAll(), prev(), prevAll(), find() and siblings in JQuery

提交回复
热议问题