Consider following HTML snippet:

<div>
   <span style="display:none;">A</span>
   <span>B</span>
   <span id="dog">C</span>
</div>
How many <span> elements will be displayed on the page after execution following jQuery code snippet?

$("#dog").hide().parent().children().show();
Explanation

    $("#dog").hide() // hide the #dog element
            .parent()  // select div element
            .children() // select of child elements of a div element
            .show(); // show all selected child elements 


Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по JavaScript
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты