“hermano jQuery” Código de respuesta

hermanos jQuery

$( "li.third-item" ).siblings().css( "background-color", "red" );
LeisureSuit Larry

jQuery seleccione uno mismo y hermanos

$(this).siblings().addBack()
Lonely Curly Boi

hermano jQuery

// Sibling with class name 
$(this).next( ".someClassNameOfSibiling" ).css( "display", "none" );

// Full code for for h3 element on click 
// hide the sibling div element
$(document).ready(function(){ 
  $("h3").on("click",function() {
    $(this).next( "div" ).css( "display", "none" );   
  })
});
Muthukumar

Seleccione un hermano en particular jquey

$(myContextNode).siblings("span.myClass")
Redwan Hussain

hermanos jQuery

//siblings()
$(document).ready(function(){
  $("h2").siblings();
});

//next()
$(document).ready(function(){
  $("h2").next();
});

//nextAll()
$(document).ready(function(){
  $("h2").nextAll();
});

//nextUntil()
$(document).ready(function(){
  $("h2").nextUntil("h6");
});




naly moslih

Respuestas similares a “hermano jQuery”

Preguntas similares a “hermano jQuery”

Más respuestas relacionadas con “hermano jQuery” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código