Code: Select all
function onLoad() {
$(".popup-image > img").attr("id", "popup-image-id");
}
function changeAlt() {
console.log("trying to change alt");
$("#popup-image-id").attr("alt","test_alt_text");
}
I tried testing this with a skin variable I'd set called "location," which is populated on hotspot mouse click. I tried the following, but it didn't work (alt text is changed to [object Object]). I know the variable itself works because I set a text box in the skin to show me the variable's current value.
Code: Select all
function changeAlt() {
console.log("trying to change alt");
$("#popup-image-id").attr("alt",$(location));
}