0

What is the difference between using $("div p") and $("div >p")

20th Nov 2018, 4:32 PM
Kyanij Maharjan
Kyanij Maharjan - avatar
3 ответов
0
From SoloLearn's jQuery course: https://www.sololearn.com/learn/jQuery/2790/
20th Nov 2018, 5:28 PM
Kirk Schafer
Kirk Schafer - avatar
0
"div p" target all p elements wich are child of a div element, even if it's not its direct parent, such as: <div><pre><p>targeted element</p></pre></div> "div > p" target only p elements wich are direct child of a div element (so previous p example will not be selected).
21st Nov 2018, 2:34 PM
visph
visph - avatar
0
Thanks for replying answer.
21st Nov 2018, 3:47 PM
Kyanij Maharjan
Kyanij Maharjan - avatar