Question:Consider the following code snippet:
$('span.item').each(function (index) {
    $(this).wrap('<li>Item</li>');
});
What does this code snippet do? 

A Wraps each span tag that has class item within a li tag. 

B Inserts each span tag that has class item into a li tag. 

C Inserts <li>Item</li> into each span that has item class. 

D Replaces each span tag that has class item with a <li>Item</li>. 

+ Answer
+ Report
Total Preview: 699

Copyright © 2024. Powered by Intellect Software Ltd