I have the warning sign character which has the value of ⚠
in HTML Entity (decimal) and I'm trying to remove it from all checkboxes' label text.
For example, in HTML, one of my input tags is as follows:
<input id='input1'/><label for='input1'>This is the warning sign ⚠</label>
How can I, using the $ (JQuery) selector, remove the ⚠
html entity from those labels.
Here's my attempt :
$('input:checkbox').each(function(index){
$(this).next().text().split('⚠').join(''); // I thought by splitting that part and then joining it with an empty string would work.
});
Aucun commentaire:
Enregistrer un commentaire