1π
β
In your Javascript, $('.description')
returns a list of all the elements that have a class description
, while the html()
function
- returns the content of the FIRST element when reading
- modifies EACH element when updating
What you need is something like this (Not tested):
$('.description').each(function(index) {
var str = $(this).html();
var edt = ...;
$(this).html(edt);
});
π€Dric512
Source:stackexchange.com