<h4 class="nobottommargin text-center keywords-data ng-scope">Keywords</h4>
What I want to do is add the item property keywords
and assign a value to it for the above tag.
$('.keywords-data').attr('itemprop','alternateName');
With the above step,
<h4 class="nobottommargin text-center keywords-data ng-scope" itemprop="alternateName">Keywords</h4>
Now I want to add the value to alternateName
, e.g.:
alternateName = 't1,t2';
Could you please provide me with suggestions on how to do this?
var keywordsData = 't1,t2';
$('.keywords-data').attr('itemprop','alternateName');
$('.keywords-data').attr('itemprop',keywordsData);
Keywords
– nambu Oct 29 '17 at 12:19