Ok, I know there are thousands of ways to do this (better and easier) but I just like to make it work. I am passing the images through JS and would like to assign the link of the same, however, it does not work ... The console does not return any error, could anyone help?
window.onload = function(){
rdSocial = $("#social");
var fb = '<img src="img/fb.png" value="1" class="img" onclick="redireciona(this);">';
var twt = '<img src="img/twitter.png" value="2" class="img" onclick="redireciona(this);">';
var insta = '<img src="img/insta.png" value="3" class="img" onclick="redireciona(this);">';
rdSocial.innerHTML += fb;
rdSocial.innerHTML += twt;
rdSocial.innerHTML += insta;
}
function redireciona(obj){
if(obj.value == "1"){
window.location="#";
}
}