I am currently developing a search feature in JavaScript that supports both regular and fancy text styles.
However, I have encountered an issue with the search functionality not working when searching for: Fancy text value: π¬πΌπ π‘π²π²π± ππΌ ππ»πΌπ ππ―πΌππ
document.getElementById("search").addEventListener("keyup", function(evt) {
[].forEach.call(document.querySelectorAll(".subjects .subject"), function(subject) {
if (subject.textContent.indexOf(evt.target.value) === -1) {
subject.classList.add("hide");
} else {
subject.classList.remove("hide");
}
});
}, false);
<input id="search"></input>
<div class="subjects">
<div class="subject">soccer</div>
<div class="subject">dancing</div>
<div class="subject">π¬πΌπ π‘π²π²π± ππΌ ππ»πΌπ ππ―πΌππ </div>
</div>