search

Home  >  Q&A  >  body text

javascript - jq traversal problem

The problem is this;


现在我有10组`<span></span>`标签
        <span></span>
        <span class="table"></span>
        <span></span>
        <span></span>
        <span class="table"></span>
        <span></span>
        <span class="table"></span>
        <span class="table"></span>

Now I want to select the class="table" and add a style to play with it

某草草某草草2754 days ago326

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 13:31:33

    $('span.table').css('color', 'red'), like this ?

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 13:31:33

    $("sapn.table").addClass("style")

    reply
    0
  • 某草草

    某草草2017-05-16 13:31:33

    $('.table').css({display: 'block', border: '1px solid #000', background: 'red'});

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:31:33

    $('span.table').addClass('class')

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 13:31:33

    $("span.table").css();

    reply
    0
  • Cancelreply