I want to select the next element of this in each() function. check out the code comments
$(function(){
var selects = $('body').find('span');
selects.each(function(index,el){
if(index==0){
//remove the next span of this, which is span2
}
});
});
<body>
<div>
<span>1</span>
</div>
<span>2</span>
<div>
<span>3</span>
</div>
</body>
Based on your DOM structure, you can do:
You can try it here.