hazyred
hazyred

Reputation: 3948

UTF8 Dingbats + Javascript

Is there a way to set the text of an element to something like ✘ (✘) using JQuery?

ie:

$('#something').text('`✔`'); //only ends in tears.

Upvotes: 2

Views: 852

Answers (1)

Jeremy J Starcher
Jeremy J Starcher

Reputation: 23863

String.fromCharCode is the tool you need.

$('#something').text(String.fromCharCode(10004)); //Checkmark

Upvotes: 4

Related Questions