Consider following code snippet:

    <p style="visibility:hidden">Something_1</p>
    <p hidden>Something_2</p>
        <p style="display:none">Something_3</p>
    function ReturnValue(){
        var countElem = $('div').find('p').length
        return countElem;
What value will return the ReturnValue function?
find() method returns descendant elements of the selected element; childred() method returns all direct children of the selected element; examle:

$('div').find('p').length; // 3
$('div').children('p').length; // 2

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes