Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JavaScript / Jquery to elide part of a figcaption element Reply To: JavaScript / Jquery to elide part of a figcaption element

#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;
}
});