Hi all! I’m trying to get this code to work:
//Using a vector image with an id "hp"
var src = '<svg width="40" height="312" style="fill:rgb(133,31,36);"><rect width="40" height="312"/></svg>';
$w.onReady(function () {
$w("#hp").src = src;
}
export function hp_click(event) {
src = '<svg width="40" height="312" style="fill:rgb(133,31,36);"><rect width="40" height="31"/></svg>';
console.log("height changed: "+src);
}
Basically console.log would return src as the right string, but the vector art wouldn’t reflect the change. Any ideas?