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

#210142
Shikkediel
Participant

Fiddled around with it a bit, this should work when it is the first occurrence of the class source :

var item = document.querySelectorAll('.source'),
text = item[0].innerHTML.substring(1);

item[0].innerHTML = text;