Home › Forums › JavaScript › JavaScript / Jquery to elide part of a figcaption element › Reply To: JavaScript / Jquery to elide part of a figcaption element
October 25, 2015 at 3:45 am
#210149
Shikkediel
Participant
Looks like Firefox is taking “letter” too literally and not recognising the dash as such…
This should do the trick as well in any case :
document.addEventListener('DOMContentLoaded', function() {
var quotes = document.querySelectorAll('.source');
for (var i in quotes) {
var text = quotes[i].innerHTML.substring(1);
quotes[i].innerHTML = text;
}
});