Get the value of id from spans inside a div using jquery
I want to get the id value from the span开发者_运维百科s.
Thanks Jean
var ids = $('div span').map(function() {
return $(this).attr('id');
});
Your question isn't very clear so this is all I can come up with.
$('span').each(function() {
alert(this.id);
});
精彩评论