Answers for "how to find the next sibling of a event in jquery"

0

jquery next sibling with class

// 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" );   
  })
});
Posted by: Guest on February-18-2022
0

select a particular sibling jquey

$(myContextNode).siblings("span.myClass")
Posted by: Guest on January-07-2021

Code answers related to "how to find the next sibling of a event in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language