KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
<html> <head> <script type="text/javascript" src="jquery.js"></script> </head> <body> <ul> <li><strong>list</strong> item 1 - one strong tag</li> <li><strong>list</strong> item <strong>2</strong> - two <span>strong tags</span></li> <li>list item 3</li> <li>list item 4</li> <li>list item 5</li> <li>list item 6</li> </ul> <script type="text/javascript"> $('li').filter(function(index) { return $('strong', this).length == 1; }).css('background-color','red'); </script> </body> </html> Given the HTML above, what's the meaning of the comma in the selector below? return $('strong', this).length == 2; What will happen if I remove the word 'strong'?
Tags (comma-separated)
Save Edits
Cancel