How would we select the 3rd li element and retrieve the value of it's id attribute w/out selecting the li by id? *You can select it by index?
<ul id="list">
<li id="one"></li>
<li id="two"></li>
<li id="three"></li>
<li id="four"></li>
</ul>
Submitted by: Muhammad$('ul li').eq(2).attr('id');
// or
var item;
$.each($('ul li'), function(i){
if (i == 2){
item = $(this).attr('id');
}
});
Submitted by: Muhammad
// or
var item;
$.each($('ul li'), function(i){
if (i == 2){
item = $(this).attr('id');
}
});
Submitted by: Muhammad
Read Online User Interface Expert Job Interview Questions And Answers
Top User Interface Expert Questions
☺ | Explain what is the difference between linking to an image, a website, and an email address? |
☺ | What is something new / something you have found interesting recently? |
☺ | Name some online resources you reference when having CSS issues? |
☺ | Tell me why did you get into coding, programming, etc.? |
Top Graphical User Interface (GUI) Categories
☺ | User Interface Expert Interview Questions. |
☺ | Front End Programmer Interview Questions. |
☺ | Lead Web Designer Interview Questions. |
☺ | Senior Graphics Designer Interview Questions. |
☺ | Web Designer Freelance Interview Questions. |