Hi all,
I have an issue where I can console log the url when it in a var but the moment that I add it back to the page within html it strips the forward slashes.
does anyone know why this would happen. I have tried to change this in any way possible but I am coming up short on why this is happening.
function hiddenlinks() {
var urllink = $(".hidden-small").map(function() {
return $(this).attr("href");
}).get().reverse();
console.log(urllink);
var spantext = $(".hidden-small span").map(function() {
return $(this).text();
}).get();
for ( var i = 0; i < urllink.length; i++ ) {
for ( var i = 0; i < spantext.length; i++ ) {
console.log(urllink[i])
var urlencode = urllink[i];
console.log(urlencode);
var finlink = '<li><a href"'+urlencode+'">'+spantext[i]+'</a></li>'
$( finlink ).prependTo( ".paradeiser_children" );
}
}
}