jquery.find方法

1

$("div").find(".1").css({"color":"red","border":"2px solid red"});

2

$( "li.item-ii" ).find( "li" ).css( "background-color", "red" );

3

var item1 = $( "li.item-1" )[ 0 ];
$( "li.item-ii" ).find( item1 ).css( "background-color", "red" );

4

var spans = $( "span" );
$( "p" ).find( spans ).css( "color", "red" );

5

$( "p" )
  .html( newText )
  .find( "span" )
    .hover(function() {
      $( this ).addClass( "hilite" );
    }, function() {
      $( this ).removeClass( "hilite" );
    })
  .end()
  .find( ":contains('t')" )
    .css({
      "font-style": "italic",
      "font-weight": "bolder"
    });

参考地址:https://api.jquery.com/find/

--------------------------------------------

jquery  parents()方法

待补充………………

 

-------------------------------

标题:jQuery-样式(jQuery选择器)

参考:https://www.csdn.net/gather_2a/OtTaIgxsNjUzLWJsb2cO0O0O.html

 

相关文章:

  • 2021-11-04
  • 2021-09-07
  • 2022-12-23
  • 2021-12-10
  • 2021-11-14
  • 2021-12-10
  • 2021-09-07
猜你喜欢
  • 2021-09-07
  • 2021-11-30
  • 2021-09-07
  • 2021-11-14
  • 2021-11-14
  • 2021-09-27
  • 2021-09-17
相关资源
相似解决方案