tag-explorer.js
によって生成されたタグの左側に表示されている文字を削除したいと思います。どうすればこれを達成できますか?編集タグexplorer.js
ここでライブのウェブサイトがあります:ここではhttps://ewelinawoloszyn.github.io/Research/research_03.html
はスクリプトです:
// The container to hold the tags.
tagContainer = document.querySelector('.tag-container');
// An array of objects where the `'element'` property is the article element (to
// be hidden), and the `'tags'` attribute is an array of tags on this article.
// Articles do not necessarily have to be the <article> element.
articles = [].slice.call(document.querySelectorAll('article')).map(function (article) {
return {
'element': article,
'tags': [].slice.call(article.querySelectorAll('.tags li')).map(function (tag) {
return tag.textContent;
})
};
});
// Create an array of tag names to be available for filtering.
tagNames = ['Public Finance', 'Access', 'Data','Money','Open Source'];
// Initialise tag-explorer.
tagExplorer(tagContainer, articles, tagNames);
ここで所望の出力だ - 私は赤が欲しいのですが、削除する文字を越えて:
どれでもアドバイスありがとうございました。
*「タグの前に文字を取り除く」*:私はその意味を理解していません。あなたが達成したいと思うものの具体的な例を教えてください:入力と希望の出力? – trincot
確かにStackoverflow @trincotでイメージを追加するにはどうすればいいですか? – Neko
質問を編集するときは、入力領域の上部にボタンバーがあります。 ( '{}'アイコンの横にある)ランドスケープのアイコンをクリックします。 – trincot