Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は試した:
$('span.tag').each(function(){ $(this).attr('title', '').prop('title', function(){$(this).children('li:first').text();}); });
なぜそんなに複雑なのですか?それはただ単純です
$('span.tag').each(function(){ $(this).attr('title', $(this).find('li:first').text()); });
これを試して:
$('span.tag').attr('title', function(){ return $(this).find('li:first').text(); });