Let's say we have unknown number of div elements. When we click on the element that element must change its background color. How to do that without using classes or ids.
NOTE: I found some questions with similar topic but they were not what I was looking for.
I mean smth like:
$(element).click(
function(){
$(element).css("background-color","#DDDDDD");
}
);
HTML:
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
CSS:
div{
height:10px;
width:10px;
float:left;
border-radius:50%;
margin:2px;
background-color:#00A2E8;
}