I followed all the answers on this post jQuery: Adding two attributes via the .attr(); method and none of them work for multiple attributes, only single attribute work.
E.g.
$("img").attr({
data-aos: "fade-down",
data-aos-duration: "600"
});
Does not work. But single attribute does work:
$("img").attr("data-aos", "fade-down");
https://jsfiddle.net/bwj5uex0/3/ You can test on JSFiddle with your browser's built-in dev tools after CTRL+Enter.