What's the difference between $("+ p", this)) and $("p", this))?

Is there any difference between

$("+ p", this)) and $("p", this))?

    <h1>introduction</h1>
    <p id="pp">it is a test

<script> $(document).ready(function(){ $("h1+p").hide(); $("h1").hover(function(){ $("+p",this).show()}, function(){ $("+p",this).hide();}); }); </script>
Apr.26,2021

the one with the plus sign is the same level as this, and the one without the plus sign is all p


$(this).find('p')

$(this).find('+p')

difference


EvaluF {sRules} Select the F element immediately after the E element, which must belong to the same parent as the F element.
E F {sRules} selects all F elements contained by the E element.

Menu