itisnot_me 0 Posting Whiz in Training

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" );
         }
      }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.